﻿<% Option Explicit %>

<!--#include file="includes/cb_adovbs_sys.inc"-->
<!--#include file="includes/authority_sys.asp" -->
<!--#include file="includes/header_sys.asp"-->
<!--#include file="includes/generally_sys.asp"-->
<!--#include file="includes/email_sys.asp"-->
<!--#include file="includes/body_calculation_sys.asp"-->
<!--#include file="includes/cb_measured_sys.inc"-->
<!--#include file="includes/translate.asp"-->
<!--#include file="includes/gwm_user_menu_dhx.asp"-->

<%
On Error Resume Next
'Codepage einstellen
Session.CodePage = 65001'Unicode, 8-bit encoding
Response.CharSet = "utf-8"

'Sprache -----------------------------------------------------------------
Dim i_lng
i_lng = Request("lng")
If IsEmpty(i_lng) or IsNull(i_lng) Then
	i_lng = Session("ses_i_language") 
end if
Session("ses_i_language")=i_lng'0=keine auswahl 1=german 2=english
'--------------------------------------------------------------------------
'für die erstanlage des geburtsdatums des athleten
Dim i_year_min
Dim i_year_max

i_year_min = Con_i_year_min
i_year_max = Con_i_year_max
'Response.Write("i_year_min: " & i_year_min & "<br>")

Dim isx
isx = Session("ses_i_isx")
If IsNull(isx) or IsEmpty(isx) Then
	isx = 0
end if
'call showMessage(isx)
'isx = 0 >> keine neue stammdateneingabe übers login
'isx = 2 >> neue head org stammdateneingabe übers login
'isx = 3 >> neue org stammdateneingabe übers login
'isx = 4 >> neue trainer stammdateneingabe übers login
'isx = 5 >> neue athlete stammdateneingabe übers login	
'If Session("ses_dev")=1 Then'0 >> normalbetrieb - 1 > Applikation im entwicklungsstatus - nur für testbetrieb - es werden wichtige var ausgegeben
'Response.Write("ses_i_isx: " & isx & "<br>")
'end if
'usergroup
'lng_fk_user_group
'1	SuperVisor	SV 	Admin All
'2	Head Org	HO 	Head Org Admin
'3	Org		OR	Org Admin
'4	Trainer		TR	Trainer Admin
'5	Athlete		AT	Athlet Admin
If Cint(isx) = 5 Then
	Session("ses_i_usergroup") = 5'trägt ein das dieser user ein Head Org Admin ist
end if
'----------------------------------------------------------------------
Dim iu
Dim ig
iu = Session("ses_iu")
ig = Session("ses_ig")
'Pruefen, ob der User eingeloggt ist
If Session("ses_iu") = 0 and Session("ses_ig") = 0 and isx = 0 Then
   'User ist nicht eingeloggt, daher zu Login Seite schicken
   Response.Redirect "session_end.asp"
   Response.End
End If
'If Session("ses_dev")=1 Then'0 >> normalbetrieb - 1 > Applikation im entwicklungsstatus - nur für testbetrieb - es werden wichtige var ausgegeben
'Response.Write("iu: " & iu & "<br>")
'Response.Write("ig: " & ig & "<br>")
'end if
'----------------------------------------------------------------------
'Response.Write("#3 ses_i_dummy_head_org: " & Session("ses_i_dummy_head_org") & "<br>")
'Response.Write("#3 ses_i_dummy_sub_org: " & Session("ses_i_dummy_sub_org") & "<br>")
Dim i_ses_i_dummy_head_org
i_ses_i_dummy_head_org= Session("ses_i_dummy_head_org")
'----------------------------------------------------------------------
'Oeffnen der Datenbankverbindung
Dim objConn
	Set objConn = Server.CreateObject("ADODB.Connection")
Dim rst
	Set rst = Server.CreateObject("ADODB.RecordSet")
Dim rst_tmp
	Set rst_tmp = Server.CreateObject("ADODB.RecordSet")	
Dim objRS 
    Set objRS = Server.CreateObject("ADODB.Recordset")
	
Dim bol_objConn
	bol_objConn = False
'Verbindung herstellen
    objConn.open strComplete_sys
    bol_objConn = True
'--------------------------------------------------------------------------
'tastengroesse sprachabhängig
Dim str_save_button_size
If i_lng = 1 Then'german
	str_save_button_size = "button220"'css style
end if
If i_lng = 2 Then'english
	str_save_button_size = "button150"'css style
end if
'---------------------------------------------------------------------------
Dim str_Msg_04'Con_Msg_04
str_Msg_04 = fc_value_string(Session("ses_i_language"), "var_glob_txt_1019")
'---------------------------------------------------------------------------
'Constante für die Drop Downs
'Const Con_Msg_06 = "- please select -"
'Const Con_Msg_06 = "-bitte auswählen-" >> var_glob_txt_1029
Dim Const_str_01
Const_str_01 = fc_value_string(Session("ses_i_language"), "var_glob_txt_1029")
'Hints Icon---------------------------------------------------------------
Dim var_hints_08
var_hints_08 = fc_value_string(Session("ses_i_language"), "var_hints_08")

Dim var_hints_47
var_hints_47 = fc_value_string(Session("ses_i_language"), "var_u_adm_d_47")

Dim var_hints_66
var_hints_66 = fc_value_string(Session("ses_i_language"), "var_hints_66")
'----------------------------------------------------------------------
'due nummer in der var ist die alte nummer von christian >> style.js
Dim hint_title_116
Dim hint_116
hint_title_116 = fc_value_string_hint_title(Session("ses_i_language"), "var_hints_01", "var_hints_57")
hint_116 = fc_value_string(Session("ses_i_language"), "var_hints_57")

Dim hint_title_117
Dim hint_117
hint_title_117 = fc_value_string_hint_title(Session("ses_i_language"), "var_hints_01", "var_hints_56")
hint_117 = fc_value_string(Session("ses_i_language"), "var_hints_56")

Dim hint_title_118
Dim hint_118
hint_title_118 = fc_value_string_hint_title(Session("ses_i_language"), "var_hints_01", "var_hints_58")
hint_118 = fc_value_string(Session("ses_i_language"), "var_hints_58")

Dim hint_title_119
Dim hint_119
hint_title_119 = fc_value_string_hint_title(Session("ses_i_language"), "var_hints_01", "var_hints_59")
hint_119 = fc_value_string(Session("ses_i_language"), "var_hints_59")

Dim hint_title_134
Dim hint_134
hint_title_134 = fc_value_string_hint_title(Session("ses_i_language"), "var_hints_01", "var_hints_60")
hint_134 = fc_value_string(Session("ses_i_language"), "var_hints_60")

Dim hint_title_120
Dim hint_120
hint_title_120 = fc_value_string_hint_title(Session("ses_i_language"), "var_hints_01", "var_hints_61")
hint_120 = fc_value_string(Session("ses_i_language"), "var_hints_61")

Dim hint_title_121
Dim hint_121
hint_title_121 = fc_value_string_hint_title(Session("ses_i_language"), "var_hints_01", "var_hints_62")
hint_121 = fc_value_string(Session("ses_i_language"), "var_hints_62")

Dim hint_title_122
Dim hint_122
hint_title_122 = fc_value_string_hint_title(Session("ses_i_language"), "var_hints_01", "var_hints_63")
hint_122 = fc_value_string(Session("ses_i_language"), "var_hints_63")

Dim hint_title_125
Dim hint_125
hint_title_125 = fc_value_string_hint_title(Session("ses_i_language"), "var_hints_01", "var_hints_64")
hint_125 = fc_value_string(Session("ses_i_language"), "var_hints_64")

Dim hint_title_150
Dim hint_150
hint_title_150 = fc_value_string_hint_title(Session("ses_i_language"), "var_hints_01", "var_hints_65")
hint_150 = fc_value_string(Session("ses_i_language"), "var_hints_65")
'----------------------------------------------------------------------
'usergroup
'lng_fk_user_group
'1	SuperVisor	SV 	Admin All
'2	Head Org	HO 	Head Org Admin
'3	Org			OR	Org Admin
'4	Trainer		TR	Trainer Admin
'5	Athlete		AT	Athlet Admin

Dim lng_fk_user_group_ses  
Dim lng_fk_User_ID_org_ses

lng_fk_user_group_ses = Session("ses_i_usergroup")
lng_fk_User_ID_org_ses = Session("ses_i_org")

'call showMessage("#3Session: " & Session("ses_i_org"))
'If Session("ses_dev")=1 Then'0 >> normalbetrieb - 1 > Applikation im entwicklungsstatus - nur für testbetrieb - es werden wichtige var ausgegeben
'Response.Write("1 UserGroup: " & lng_fk_user_group_ses & "<br>")
'Response.Write("3 Sub ORG: " & lng_fk_User_ID_org_ses & "<br>")
'end if
'----------------------------------------------------------------------
Dim str_title
str_title = Session("ses_title")
'----------------------------------------------------------------------
Dim str_text_trennzeichen'zb: |
str_text_trennzeichen = fc_value_string(Session("ses_i_language"), "var_glob_txt_1009")'"New Login"

'2011 12 30 für die textausgabe wer ist angemeldet
'2012 02 25 menü rechts oben hier eingelesen werde
Session("ses_txt_logininfo_z01")=fc_value_string(Session("ses_i_language"), "var_glob_txt_1020")'"zb: Angemeldet als:" 'zeile 1
Session("ses_txt_logininfo_z02")=Session("ses_str_head_org") & " " & str_text_trennzeichen & " " & Session("ses_str_org") & " " & str_text_trennzeichen & " " & Session("ses_str_trainer")'"zb: SK Sturm | Growmetry Administrator" 'zeile 2
Session("ses_txt_logininfo_z03")=fc_value_string(Session("ses_i_language"), "var_glob_txt_1022")'"zb: Organisation | Funktion" 'zeile 3

%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/vorlage_std_all.dwt" codeOutsideHTMLIsLocked="false" -->
<!-- ----------------------------------------------------------- -->
<!--       Beratung, Projektierung, Webdesign und Umsetzung      -->
<!--                     www.on-designs.com                      -->
<!-- Christian Freidl, Gärtnerweg 6, 8073 Neuseiersberg, Austria -->
<!-- ----------------------------------------------------------- -->
<!-- ----------------------------------------------------------- -->
<!--        Beratung, Projektierung, ASP-Programmierung          -->
<!--                     www.bribase.com                         -->
<!--                    Peter Brislinger,                        -->
<!--        Paul-Anton-Keller-Gasse 23, 8073 Feldkirchen         -->
<!-- ----------------------------------------------------------- -->
<head>
<% CALL writeGwmCustomHeaders %>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title><%= str_title %> - Administration</title>
<!-- InstanceEndEditable -->
<LINK REL="SHORTCUT ICON" HREF="http://www.growmetry.com/favicon.ico">
<meta name="author" content="Programming by Peter Brislinger, http://www.bribase.com | Web & Interfacedesign by Christian Freidl, http://www.on-designs.com">
<meta name="robots" content="noindex, nofollow">
<meta name="audience" content="all">
<style type="text/css">
<!--
A:link, A:visited, A:active {text-decoration: none; color:#333333}
A:hover {text-decoration: underline}
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	SCROLLBAR-FACE-COLOR: #ffffff; 
	SCROLLBAR-HIGHLIGHT-COLOR: #ffffff;
	SCROLLBAR-SHADOW-COLOR: #cccccc;
	SCROLLBAR-3DLIGHT-COLOR: #cccccc;
	SCROLLBAR-ARROW-COLOR: #666666;
	SCROLLBAR-TRACK-COLOR: #ffffff;
	SCROLLBAR-DARKSHADOW-COLOR: #ffffff
}
-->
</style>
<link href="../css/growmetry.css" rel="stylesheet" type="text/css" />
<!-- start change password includes -->
<link type='text/css' href='css/popup.css' rel='stylesheet' />
<link type='text/css' href='css/ch_pw.css' rel='stylesheet' />
<script type="text/javascript" src="js/jquery.js"></script>
<script type='text/javascript' src='js/jquery.simplemodal-1.4.4.js'></script>
<script type='text/javascript' src='js/popup.js'></script>
<script type='text/javascript' src='js/ch_pw.js'></script>

<!-- end change password includes -->

<!-- InstanceBeginEditable name="head" -->
<style type="text/css">
<!--
.Stil4 {color: #FF0000}
.Stil6 {font-size: 10px}
-->
</style>
<%
	'include scripts for the menu
	CALL userMenuAddScripts
%>
<!-- InstanceEndEditable -->
</head>

<body>
<script type="text/javascript" src="includes/wz_tooltip.js"></script>
<script type="text/javascript" language="JavaScript">
function change_language(i)
{
//http://www.growmetry.com/APX_Translate/main_menu.asp
//var str_domain = "www.growmetry.com"
//var str_pathname = window.location.pathname;
//var str_ziel = str_domain && str_pathname;


var str_ziel = new String(window.location);

var p1 = get_page_params();
var p2 = get_page_params();

var i_language ="0";//default - 0=bedeutet ohne lng=x // 1=mit lng=x zb. .asp?lng=1
var i_asp="0";//default -1=bedeutet das in der url zum schluss nur mehr asp steht // 0=das in der url schon zusätzliche parameter stehen zb: .asp?btnsub=N oder .asp?lng=1

//überprüft ob schon ein sprachinfo in der url ist
	  if (p2['lng']) 
	  {
	  	//Do something
	  	i_language = 1
		//alert("NNNN");
	  }  
	  else
	  {
	  	i_language = 0   
	  }


//Überprüft ob es eine info in der URL gibt
	  var str_asp_default = "asp";
	  //var i_laenge = str_ziel.length;
	  //var str_last03 = new String((str_ziel[i_laenge-3] + str_ziel[i_laenge-2] + str_ziel[i_laenge-1]));
	  var str_last03 = str_ziel.substr((str_ziel.length)-3); //liefert die letzten drei zeichen
	  
	  if (str_last03 == str_asp_default)//german
	  {
		//default 1=bedeutet das in der url zum schluss nur mehr asp steht
		i_asp = 1;
	  }
	  else
	  {
		//default 0=das in der url schon zusätzliche parameter stehen zb: .asp?btnsub=N oder .asp?lng=1
		i_asp = 0;
	  }
	  

//alert("str_ziel: " + str_ziel);
//alert("str_last03: " + str_last03);
//alert("i: " + i);
//alert("i_language: " + i_language);	  
//alert("i_asp: " + i_asp);

//wenn in der url noch keine parameter sind und die sprachinfo auch fehlt
	  if (i_asp == "1" && i=="1" && i_language=="0")//german
	  {
			str_ziel = str_ziel + "?lng=1"  
	  }
	  if (i_asp == "1" && i=="2" && i_language=="0")//english
	  {
			str_ziel = str_ziel + "?lng=2"  
	  }

//wenn in der url schon parameter sind und die sprachinfo auch fehlt
	  if (i_asp == "0" && i=="1" && i_language=="0")//german
	  {
			str_ziel = str_ziel + "&lng=1"  
	  }
	  if (i_asp == "0" && i=="2" && i_language=="0")//english
	  {
			str_ziel = str_ziel + "&lng=2"  
	  }

//wird nur ausgeführt wenn schon eine sprachinfo in der url ist
	  if (i == "1")//german
	  {
		  str_ziel = SuchenUndErsetzen(str_ziel, "lng=2", "lng=1")
	  } 
	  
	  if (i == "2")//English
	  {
		  str_ziel = SuchenUndErsetzen(str_ziel, "lng=1", "lng=2")
	  } 


	window.location.href = str_ziel;
}

function SuchenUndErsetzen(QuellText, SuchText, ErsatzText)
	  {   // Erstellt von Ralf Pfeifer
		  // Fehlerpruefung
		  if ((QuellText == null) || (SuchText == null))           { return null; }
		  if ((QuellText.length == 0) || (SuchText.length == 0))   { return QuellText; }

		  // Kein ErsatzText ?
		  if ((ErsatzText == null) || (ErsatzText.length == 0))    { ErsatzText = ""; }

		  var LaengeSuchText = SuchText.length;
		  var LaengeErsatzText = ErsatzText.length;
		  var Pos = QuellText.indexOf(SuchText, 0);

		  while (Pos >= 0)
		  {
			  QuellText = QuellText.substring(0, Pos) + ErsatzText + QuellText.substring(Pos + LaengeSuchText);
			  Pos = QuellText.indexOf(SuchText, Pos + LaengeErsatzText);
		  }
		  return QuellText;
	  } 


//sucht einen String innerhalb eines Strings (Andrey)
function get_page_params() 
{
       function unspace( qs_element ) {
               return qs_element.split( '+' ).join( ' ' );
       }
       var QueryString = new Array();
       QueryString["_"]="";
       if ( location.search.length > 1 ) {
               var qs_query = location.search.substring( 1, location.search.length );
               var qs_pairs = qs_query.split( '&' );
               for ( var qs_index = 0; qs_index < qs_pairs.length; qs_index++ ) {
                       var qs_element = qs_pairs[qs_index].split( '=' );
                       QueryString[qs_element[0]] = unspace( unescape( qs_element[1] ) );
               }
       }
       return QueryString;

}


</SCRIPT>  

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" class="backout">
<table width="950" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="479" valign="top" background="../App/images/standard/filler_vert.gif"><table width="950" border="0" cellpadding="0" cellspacing="0" class="<%= fc_value_string(Session("ses_i_language"), "var_glob_bitm_20") %>">
<tr>
<td width="25" height="90">&nbsp;</td>
<td width="900" height="90">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="bottom"><div align="right" class="txtsm">
</div>
<div align="right">
<div align="right" class="txtsm"></div>
</div>

<div align="right"><span class="txtloginasgrey"><%=Session("ses_txt_logininfo_z01")%></span><span class="txtloginasred"><strong><%=Session("ses_str_User_name")%></strong></span>
<span class="txtloginasgrey"> <%= fc_value_string(Session("ses_i_language"), "var_glob_txt_1009") %> <a href="index.asp"><%= fc_value_string(Session("ses_i_language"), "var_glob_txt_02") %></a></span><br/>
<strong class="txtloginasgreen"><%=Session("ses_txt_logininfo_z02")%> </strong><br/>
<span class="txtloginasgrey"><%=Session("ses_txt_logininfo_z03")%></span><br/>
</div>
</td>
</tr>
</table>
</td>
<td width="25" height="90">&nbsp;</td>
</tr>
<tr>
<td width="25">&nbsp;</td><!-- InstanceBeginEditable name="Edit_navi" -->
<script src="includes/constant.js"></script>
<script type="text/javascript" language="JavaScript">

//-------------------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------------------
window.onload = function (){
    refresh_window();
    win_onload();
}
//-------------------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------------------
//http://www.arstechnica.de/index.html?name=http://www.arstechnica.de/computer/JavaScript/JS11_08.html
//--- Prüft, ob eine eMail-Adresse korrekt aufgebaut ist
function eMailAdresseOK(eMail)
{ 
var nn = "\n\n"

     // Falls das Feld leer ist, ohne Prüfung aussteigen
     if (eMail.value.length==0) { return true }

     // Text für die Fehlermeldung
     //var FehlerMeldung = new String("Falsche Email-Adresse\n\n")
	 var FehlerMeldung = new String("<%= fc_value_string(Session("ses_i_language"), "var_java_64")%>") + nn

     // Position des @ herausfinden
     var PosEt = eMail.value.indexOf("@")
     if (PosEt == -1) 
	 {
       //alert(FehlerMeldung + "@ fehlt in der Email-Adresse")
	   alert(FehlerMeldung + "<%= fc_value_string(Session("ses_i_language"), "var_java_65")%>")
       return eMail.focus() 
	 }
     if (PosEt == 0) 
	 {
       //alert(FehlerMeldung + "Eine Email-Adresse fehlt")
	   alert(FehlerMeldung + "<%= fc_value_string(Session("ses_i_language"), "var_java_66")%>")
       return eMail.focus()
	 }
     if (eMail.value.indexOf("@", PosEt + 1) > PosEt)
	 {
       //alert(FehlerMeldung + "Eine Email-Adresse kann nur EIN @-Symbol enthalten")
	   alert(FehlerMeldung + "<%= fc_value_string(Session("ses_i_language"), "var_java_67")%>")
       return eMail.focus()
	 }

     // Position des ersten . nach dem @ herausfinden
     var PosPt = eMail.value.indexOf(".", PosEt)

     if ((PosPt == -1) || (PosPt - PosEt < 2) || (eMail.value.length - PosPt < 3))
	 {
       //FehlerMeldung += "Eine zugelassene Email-Adresse muss folgende Struktur ww haben: x@x.xx!"
	   FehlerMeldung +="<%= fc_value_string(Session("ses_i_language"), "var_java_68")%>";
       //FehlerMeldung += "Jedes x steht fur mindestens ein Zeichen"
	   FehlerMeldung +="<%= fc_value_string(Session("ses_i_language"), "var_java_69")%>";
       alert(FehlerMeldung)
       return eMail.focus()
	  }

     // Zulässige Zeichen für eMails definieren
     var ZugelasseneZeichen = new String("abcdefghijklmnopqrstuvwxyz")
     ZugelasseneZeichen += ZugelasseneZeichen.toUpperCase() + "0123456789.-_@"

     // eMail-Adresse auf zulässige Zeichen überprüfen
     return PruefeZeichen(eMail, ZugelasseneZeichen, FehlerMeldung)
}

//--- Unterprogramm, welches die Zeichen prüft
function PruefeZeichen(Feld, ZugelasseneZeichen, FehlerMeldung)
{  // Erstellt von Ralf Pfeifer (www.arstechnica.de)
var nn = "\n"

   for (var Pos = 0; Pos < Feld.value.length; Pos++)
   {
	  if (ZugelasseneZeichen.indexOf(Feld.value.charAt(Pos)) == -1)
	  { //FehlerMeldung += "\n\nYour email address contains the character '"
	  	FehlerMeldung += nn + "<%= fc_value_string(Session("ses_i_language"), "var_java_70")%>"
		FehlerMeldung += Feld.value.charAt(Pos)
		//FehlerMeldung += "'. Characters that are allowed:\n"
		FehlerMeldung += "<%= fc_value_string(Session("ses_i_language"), "var_java_71")%>" + n
		FehlerMeldung += ZugelasseneZeichen
		if (ZugelasseneZeichen.indexOf(" ") == -1)
		   //{ FehlerMeldung += "\nSpace characters are not allowed" }
		   { FehlerMeldung += n + "<%= fc_value_string(Session("ses_i_language"), "var_java_72")%>" }
		else
		   //{ FehlerMeldung += "\nand the space character" }
		   { FehlerMeldung += n + "<%= fc_value_string(Session("ses_i_language"), "var_java_73")%>" }
		alert(FehlerMeldung)
		Feld.focus()
		return
	 }
   }
}
//-------------------------------------------------------------------------------------------------------

function refresh_window()
{
refresh_measured_sytem_athlete();
refresh_measured_sytem_mother();
refresh_measured_sytem_father();
refresh_birthday();
error_msg(0);
}
//-------------------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------------------
// überprüft ob ein leerzeichen eingegeben wurde
function check_leerzeichen_pw_confirm(i)
{

var str_string=document.frm_value.str_pw_confirm.value;
var i_laenge = str_string.length; 
//0=min ein leerzeichen im text - -1 alles in Ordnung
var i_Suche = str_string.indexOf(" ");
//alert("gefunden bei Position: " + Suche);


	if (i_Suche >= "0" && i_laenge > "3")
	{
		if (i=="0")
		{
		//alert(str_info_75c);
		alert("<%= fc_value_string(Session("ses_i_language"), "var_java_27")%>");
		}
		document.frm_value.str_pw_confirm.style.backgroundColor = str_color_red;
		return document.frm_value.str_pw_confirm.focus()
	}
	else
	{
		document.frm_value.str_pw_confirm.backgroundColor = "";
		document.frm_value.str_pw_confirm.style.backgroundColor = "";
	}
}

//-------------------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------------------
// überprüft ob ein leerzeichen eingegeben wurde
function check_leerzeichen_pw(i)
{

var str_string=document.frm_value.str_pw.value;
var i_laenge = str_string.length; 
//0=min ein leerzeichen im text - -1 alles in Ordnung
var i_Suche = str_string.indexOf(" ");
//alert("gefunden bei Position: " + Suche);

	if (i_Suche >= "0" && i_laenge > "3")
	{
		if (i=="0")
		{
		//alert(str_info_75b);
		alert("<%= fc_value_string(Session("ses_i_language"), "var_java_28")%>");
		}
		document.frm_value.str_pw.style.backgroundColor = str_color_red;
		return document.frm_value.str_pw.focus()
	}
	else
	{
		document.frm_value.str_pw.backgroundColor = "";
		document.frm_value.str_pw.style.backgroundColor = "";
	}
}
//-------------------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------------------
// überprüft ob ein leerzeichen eingegeben wurde
function check_leerzeichen_user_id(i)
{
var str_string=document.frm_value.str_User_id.value;
var i_laenge = str_string.length; 
//0=min ein leerzeichen im text - -1 alles in Ordnung
var i_Suche = str_string.indexOf(" ");
//alert("gefunden bei Position: " + Suche);

	if (i_Suche >= "0" && i_laenge > "3")
	{
		if (i=="0")
		{
		//alert(str_info_75a);
		alert("<%= fc_value_string(Session("ses_i_language"), "var_java_29")%>");
		}
		document.frm_value.str_User_id.style.backgroundColor = str_color_red;
		return document.frm_value.str_User_id.focus()
	}
	else
	{
		document.frm_value.str_User_id.backgroundColor = "";
		document.frm_value.str_User_id.style.backgroundColor = "";
	}
}
//-------------------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------------------
function error_msg(i)
{
var strFehler='';
var i_insert_error=document.frm_value.i_insert_error.value;

	if (document.frm_value.i_insert_error.value > "0")
	{
	strFehler +="<%= fc_value_string(Session("ses_i_language"), "var_java_31")%>";
	} 
	
	if (strFehler.length>0)
	{
	alert(strFehler);
	}
	
	if (i_insert_error>"0")
	{
		document.frm_value.str_User_id.style.backgroundColor = str_color_red;
	}
}

var i_alter_min=<%= i_year_min %>
var i_alter_max=<%= i_year_max %>

var get_alter_year
var get_alter_month
var get_alter_day

//berechnet das genaue alter
function get_alter()
{
var i_date_format = document.frm_value.LST_date_format.value;
var i_day
var i_month
var i_year

//1	dd.mm.yyyy
//2	mm.dd.yyyy

	if (i_date_format == "1")
	{
		i_day = document.frm_value.LST_day_01.value;
		i_month = document.frm_value.LST_month_01.value;
		i_year = document.frm_value.LST_year_01.value;
	}

	if (i_date_format == "2")
	{
		i_day = document.frm_value.LST_day_02.value;
		i_month = document.frm_value.LST_month_02.value;
		i_year = document.frm_value.LST_year_02.value;
	}
	
today = new Date();
bYear  = i_year;  // Start Jahr
bMonth = i_month;    // Start Monat
bDay   = i_day;  // Start Tag
tYear  =  today.getFullYear();
tMonth =  (today.getMonth() ) + 1 ;
tDay   =  today.getDate();
tHour  =  today.getHours();
fYear  = 0;
fMonth = 0;
fDay   = 0;
fHour  = 0;
x = 0;
y = 0;
z = 0;
a = 0;
b = 0;
c = 0;
function testMonth() {
     if (y==4 || y==6 || y==9 || y==11) x=30
     else if (y==2) x=28
     else x=31
}
function testDay() {
     fDay = (z - bDay) + tDay;
          if (fDay > a) {
               fMonth += 1;
               fDay = fDay - a;
          }
}
y = bMonth;
testMonth();
z = x;
y = bMonth;
testMonth();
a = x;
if (bMonth <= tMonth) {
     fYear = tYear - bYear;
     fMonth = (tMonth - bMonth);
     testDay();
}
fYear = (tYear - bYear) - 1
fMonth = ((12 - bMonth) + tMonth) - 1;
testDay();
if (fMonth >= 12) {
     fYear += 1;
     fMonth -= 12;
}
with(Math) {
theYear=fYear;
tensYear=floor(theYear/10);
onesYear=theYear-(tensYear*1);
theMonth=fMonth
tensMonth=floor(theMonth/10);
onesMonth=theMonth-(tensMonth*1);
theDay=fDay
tensDay=floor(theDay/10);
onesDay=theDay-(tensDay*1);
var testArray = new makeArray("Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember");
for (z=1; z<=12; z++) {
  if (tMonth==z) {
      var b=testArray[z]
   }
}
for (z=1; z<=12; z++) {
  if (bMonth==z) {
      var c=testArray[z]
   }
}
}

if(parseInt(tensYear+onesYear) == 1) {
	get_alter_year = tensYear + onesYear
}
else {
	get_alter_year = tensYear + onesYear
}
if(parseInt(tensYear+onesYear) == 0) {
	get_alter_year = ""
}

if(parseInt(tensMonth+onesMonth) == 1) {
	get_alter_month=tensMonth + onesMonth
}
else {
	get_alter_month= tensMonth + onesMonth
}

if(parseInt(tensDay+onesDay) == 1) {
	get_alter_day= tensDay + onesDay
}
else {
	get_alter_day= tensDay + onesDay
}
function makeArray() {
      this.length = makeArray.arguments.length
      for (var i = 0; i < this.length; i++)
      this[i+1] = makeArray.arguments[i]
}
//alert(get_alter_year + " Jahre " + get_alter_month + " Monate " + get_alter_day + "Tage")
}
//-------------------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------------------
function go_back(i)
{
var go_back_01 ="main_menu.asp"
location.href=go_back_01;
}

function check_save(i)
{
	if (i == "1")//save
	{
	document.frm_value.btnSub.value = "S";
	} 
	if (i == "3")//record save
	{
	document.frm_value.btnSub.value = "R";
	} 
}
//-------------------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------------------
//Athlete Geburtstag
function refresh_birthday()
{
var i_date_format = document.frm_value.LST_date_format.value;
var i_day
var i_month
var i_year
var dt_date

//alert(i_date_format)
	if (i_date_format == "")
	{
	i_date_format = "1"//1	dd.mm.yyyy
	document.frm_value.LST_date_format.value = "1";
	}

	if (i_date_format == "0")
	{
	i_date_format = "1"//1	dd.mm.yyyy
	document.frm_value.LST_date_format.value = "1";
	}

//1	dd.mm.yyyy
//2	mm.dd.yyyy
	if (i_date_format == "1")
	{
		i_day = document.frm_value.LST_day_01.value;
			if (i_day.length == "1")
			{
			i_day = "0" + i_day
			}
		i_month = document.frm_value.LST_month_01.value;
			if (i_month.length == "1")
			{
			i_month = "0" + i_month
			}
		i_year = document.frm_value.LST_year_01.value;
		dt_date = i_day + "-" + i_month + "-" + i_year;
		document.frm_value.dt_birthday.value = dt_date;
		
		document.getElementById("tab_birthday_01").style.display="";
		document.getElementById("tab_birthday_02").style.display="none";
	}

	if (i_date_format == "2")
	{
		i_day = document.frm_value.LST_day_02.value;
			if (i_day.length == "1")
			{
			i_day = "0" + i_day
			}
		i_month = document.frm_value.LST_month_02.value;
			if (i_month.length == "1")
			{
			i_month = "0" + i_month
			}
		i_year = document.frm_value.LST_year_02.value;
		dt_date = i_day + "-" + i_month + "-" + i_year;
		document.frm_value.dt_birthday.value = dt_date;
		
		document.getElementById("tab_birthday_01").style.display="none";
		document.getElementById("tab_birthday_02").style.display="";
	}
}
//Athlete Größernerfassung
function refresh_measured_sytem_athlete()
{
//tab_cm_athlete
//tab_kg_athlete_athlete
//tab_feet_08_athlete
//tab_feet_16_athlete
//tab_feet_32_athlete_athlete
//tab_lbs_athlete_athlete
var i_measured_sytem_athlete = document.frm_value.LST_i_measured_sytem_athlete.value;
//alert(i_measured_sytem)

//document.getElementById("tab_cm_athlete").zel_cm01.value = "N";
//document.getElementById("zel_cm01").value = "test-text";
//document.getElementById("zel_cm01").firstChild.data =  "test-text";
	
	if (i_measured_sytem_athlete == "")
	{
		i_measured_sytem_athlete = "1";
	}

	if (i_measured_sytem_athlete == "0")
	{
		document.getElementById("tab_cm_athlete").style.display="none";
		document.getElementById("tab_kg_athlete").style.display="none";
		document.getElementById("tab_feet_08_athlete").style.display="none";
		document.getElementById("tab_feet_16_athlete").style.display="none";
		document.getElementById("tab_feet_32_athlete").style.display="none";
		document.getElementById("tab_lbs_athlete").style.display="none"; 
	}

//metric
	if (i_measured_sytem_athlete == "1")
	{
		document.getElementById("tab_cm_athlete").style.display="";
		document.getElementById("tab_kg_athlete").style.display="";
		document.getElementById("tab_feet_08_athlete").style.display="none";
		document.getElementById("tab_feet_16_athlete").style.display="none";
		document.getElementById("tab_feet_32_athlete").style.display="none";
		document.getElementById("tab_lbs_athlete").style.display="none"; 
	}

//feet + 1/8
	if (i_measured_sytem_athlete == "2")
	{
		document.getElementById("tab_cm_athlete").style.display="none";
		document.getElementById("tab_kg_athlete").style.display="none";
		document.getElementById("tab_feet_08_athlete").style.display="";
		document.getElementById("tab_feet_16_athlete").style.display="none";
		document.getElementById("tab_feet_32_athlete").style.display="none";
		document.getElementById("tab_lbs_athlete").style.display=""; 
	}

//feet + 1/16
	if (i_measured_sytem_athlete == "3")
	{
		document.getElementById("tab_cm_athlete").style.display="none";
		document.getElementById("tab_kg_athlete").style.display="none";
		document.getElementById("tab_feet_08_athlete").style.display="none";
		document.getElementById("tab_feet_16_athlete").style.display="";
		document.getElementById("tab_feet_32_athlete").style.display="none";
		document.getElementById("tab_lbs_athlete").style.display=""; 
	}	

//feet + 1/32
	if (i_measured_sytem_athlete == "4")
	{
		document.getElementById("tab_cm_athlete").style.display="none";
		document.getElementById("tab_kg_athlete").style.display="none";
		document.getElementById("tab_feet_08_athlete").style.display="none";
		document.getElementById("tab_feet_16_athlete").style.display="none";
		document.getElementById("tab_feet_32_athlete").style.display="";
		document.getElementById("tab_lbs_athlete").style.display=""; 
	}	

}
//mother Größernerfassung
function refresh_measured_sytem_mother()
{
//tab_cm_mother
//tab_kg_mother_mother
//tab_feet_08_mother
//tab_feet_16_mother
//tab_feet_32_mother_mother
//tab_lbs_mother_mother

var i_measured_sytem_mother = document.frm_value.LST_i_measured_sytem_mother.value;
var i_mother_default//Defaultgröße der mutter
//alert(i_measured_sytem_mother)

//document.getElementById("tab_cm_mother").zel_cm01.value = "N";
//document.getElementById("zel_cm01").value = "test-text";
//document.getElementById("zel_cm01").firstChild.data =  "test-text";
	
	if (i_measured_sytem_mother == "")
	{
		i_measured_sytem_mother = "1";
	}

//Defaultgröße
	if (document.frm_value.ckk_i_mother_default.checked == true)
	{
		i_mother_default = "1";//mit Defaultgröße
		document.frm_value.LST_i_measured_sytem_mother.disabled='disabled';
	}
	
	if (document.frm_value.ckk_i_mother_default.checked == false)
	{
		i_mother_default = "0";//ohne Defaultgröße
		document.frm_value.LST_i_measured_sytem_mother.disabled='';
	}

//alert(i_father_default)
	if (i_mother_default=="1")
	{
		document.getElementById("tab_cm_mother").style.display="none";
		document.getElementById("tab_feet_08_mother").style.display="none";
		document.getElementById("tab_feet_16_mother").style.display="none";
		document.getElementById("tab_feet_32_mother").style.display="none";
	}

	if (i_measured_sytem_mother == "0" && i_mother_default=="0")
	{
		document.getElementById("tab_cm_mother").style.display="none";
		document.getElementById("tab_feet_08_mother").style.display="none";
		document.getElementById("tab_feet_16_mother").style.display="none";
		document.getElementById("tab_feet_32_mother").style.display="none";
	}

//metric
	if (i_measured_sytem_mother == "1" && i_mother_default=="0")
	{
		document.getElementById("tab_cm_mother").style.display="";
		document.getElementById("tab_feet_08_mother").style.display="none";
		document.getElementById("tab_feet_16_mother").style.display="none";
		document.getElementById("tab_feet_32_mother").style.display="none";
	}

//feet + 1/8
	if (i_measured_sytem_mother == "2" && i_mother_default=="0")
	{
		document.getElementById("tab_cm_mother").style.display="none";
		document.getElementById("tab_feet_08_mother").style.display="";
		document.getElementById("tab_feet_16_mother").style.display="none";
		document.getElementById("tab_feet_32_mother").style.display="none";
	}

//feet + 1/16
	if (i_measured_sytem_mother == "3" && i_mother_default=="0")
	{
		document.getElementById("tab_cm_mother").style.display="none";
		document.getElementById("tab_feet_08_mother").style.display="none";
		document.getElementById("tab_feet_16_mother").style.display="";
		document.getElementById("tab_feet_32_mother").style.display="none";
	}	

//feet + 1/32
	if (i_measured_sytem_mother == "4" && i_mother_default=="0")
	{
		document.getElementById("tab_cm_mother").style.display="none";
		document.getElementById("tab_feet_08_mother").style.display="none";
		document.getElementById("tab_feet_16_mother").style.display="none";
		document.getElementById("tab_feet_32_mother").style.display="";
	}	

}

//father Größernerfassung
function refresh_measured_sytem_father()
{
//tab_cm_father
//tab_kg_father_father
//tab_feet_08_father
//tab_feet_16_father
//tab_feet_32_father_father
//tab_lbs_father_father

var i_measured_sytem_father = document.frm_value.LST_i_measured_sytem_father.value;
var i_father_default//Defaultgröße des vaters

//alert(i_father_default)
	
	if (i_measured_sytem_father == "")
	{
		i_measured_sytem_father = "1";
	}

//Defaultgröße
	if (document.frm_value.ckk_i_father_default.checked == true)
	{
		i_father_default = "1";//mit Defaultgröße
		document.frm_value.LST_i_measured_sytem_father.disabled='disabled';
	}
	if (document.frm_value.ckk_i_father_default.checked == false)
	{
		i_father_default = "0";//ohne Defaultgröße
		document.frm_value.LST_i_measured_sytem_father.disabled='';
	}

//alert(i_father_default)
	if (i_father_default=="1")
	{
		document.getElementById("tab_cm_father").style.display="none";
		document.getElementById("tab_feet_08_father").style.display="none";
		document.getElementById("tab_feet_16_father").style.display="none";
		document.getElementById("tab_feet_32_father").style.display="none";
	}

	if (i_measured_sytem_father == "0" && i_father_default=="0")
	{
		document.getElementById("tab_cm_father").style.display="none";
		document.getElementById("tab_feet_08_father").style.display="none";
		document.getElementById("tab_feet_16_father").style.display="none";
		document.getElementById("tab_feet_32_father").style.display="none";
	}

//metric
	if (i_measured_sytem_father == "1" && i_father_default=="0")
	{
		document.getElementById("tab_cm_father").style.display="";
		document.getElementById("tab_feet_08_father").style.display="none";
		document.getElementById("tab_feet_16_father").style.display="none";
		document.getElementById("tab_feet_32_father").style.display="none";
	}

//feet + 1/8
	if (i_measured_sytem_father == "2" && i_father_default=="0")
	{
		document.getElementById("tab_cm_father").style.display="none";
		document.getElementById("tab_feet_08_father").style.display="";
		document.getElementById("tab_feet_16_father").style.display="none";
		document.getElementById("tab_feet_32_father").style.display="none";
	}

//feet + 1/16
	if (i_measured_sytem_father == "3" && i_father_default=="0")
	{
		document.getElementById("tab_cm_father").style.display="none";
		document.getElementById("tab_feet_08_father").style.display="none";
		document.getElementById("tab_feet_16_father").style.display="";
		document.getElementById("tab_feet_32_father").style.display="none";
	}	

//feet + 1/32
	if (i_measured_sytem_father == "4" && i_father_default=="0")
	{
		document.getElementById("tab_cm_father").style.display="none";
		document.getElementById("tab_feet_08_father").style.display="none";
		document.getElementById("tab_feet_16_father").style.display="none";
		document.getElementById("tab_feet_32_father").style.display="";
	}	
}
//------------------------------------------------------------
//------------------------------------------------------------
// Formular Überprüfung
//------------------------------------------------------------
//------------------------------------------------------------
var dt_birthday;

function Form_inputcheck(theForm)
{
var strFehler='';

//Start Date --------------------------------------
	if (theForm.dt_birthday.value == "0")
	{
		//strFehler += str_info_61;
		strFehler +="<%= fc_value_string(Session("ses_i_language"), "var_java_80") %>";
	}

	if (theForm.dt_birthday.value == "")
	{
		//strFehler += str_info_61;
		strFehler +="<%= fc_value_string(Session("ses_i_language"), "var_java_80") %>";
	}

//var y0 = document.frm_value.dt_date_from.value;
//var x0 = (gueltigesDatum(y0));
var x0 = (gueltigesDatum(theForm.dt_birthday.value));
 	if (x0 == "0")
	{
		//strFehler += str_info_62a;
		strFehler +="<%= fc_value_string(Session("ses_i_language"), "var_java_81") %>";
	}

//ENDE Date --------------------------------------

	if (theForm.LST_date_format.value == "0")
	{
		//strFehler += str_info_64;
		strFehler +="<%= fc_value_string(Session("ses_i_language"), "var_java_82")%>";
		theForm.LST_date_format.style.backgroundColor = str_color_red;
	}
	else
	{
		theForm.LST_date_format.style.backgroundColor = "";
	}

//User ID	
	if (theForm.str_User_id.value == "")
	{
		//strFehler += str_info_64;
		strFehler +="<%= fc_value_string(Session("ses_i_language"), "var_java_33")%>";		
		theForm.str_User_id.style.backgroundColor = str_color_red;
	}
	else
	{
		theForm.str_User_id.style.backgroundColor = "";
	}
	
//PW
	if (theForm.str_pw.value == "")
	{
		//strFehler += str_info_65;
		strFehler +="<%= fc_value_string(Session("ses_i_language"), "var_java_34")%>";
		theForm.str_pw.style.backgroundColor = str_color_red;
	}
	else
	{
		theForm.str_pw.style.backgroundColor = "";
	}

//überpürft ob ein leerzeichen im userid und pw ist ----------------
//var str_string;
//var i_laenge; 
//var i_Suche;
//
////userid
//str_string=document.frm_value.str_User_id.value;
//i_laenge = str_string.length; 
////0=min ein leerzeichen im text - -1 alles in Ordnung
//i_Suche = str_string.indexOf(" ");
//
//	if (i_Suche >= "0" && i_laenge > "3")
//	{
//		strFehler += str_info_64b;
//		theForm.str_User_id.style.backgroundColor = str_color_red;
//
//	}
//	else
//	{
//		theForm.str_User_id.style.backgroundColor = "";
//	}
//
////pw
//str_string=document.frm_value.str_pw.value;
//i_laenge = str_string.length; 
////0=min ein leerzeichen im text - -1 alles in Ordnung
//i_Suche = str_string.indexOf(" ");
//
//	if (i_Suche >= "0" && i_laenge > "3")
//	{
//		strFehler += str_info_65b;
//		theForm.str_pw.style.backgroundColor = str_color_red;
//
//	}
//	else
//	{
//		theForm.str_pw.style.backgroundColor = "";
//	}
// ende überprüfung leerzeichen -------------------------------------

//PW Confirm	
	if (theForm.str_pw_confirm.value == "")
	{
		//strFehler += str_info_66;
		strFehler +="<%= fc_value_string(Session("ses_i_language"), "var_java_35")%>"
		theForm.str_pw_confirm.style.backgroundColor = str_color_red;
	}
	else
	{
		theForm.str_pw_confirm.style.backgroundColor = "";
	}
	
	if (theForm.str_pw.value != theForm.str_pw_confirm.value)
	{
		//strFehler += str_info_67;
		strFehler +="<%= fc_value_string(Session("ses_i_language"), "var_java_36")%>";
		theForm.str_pw.style.backgroundColor = str_color_red;
		theForm.str_pw_confirm.style.backgroundColor = str_color_red;
	}
	
	if (theForm.str_pw.value.length != theForm.str_pw_confirm.value.length)
	{
		//strFehler += str_info_04a;
		strFehler +="<%= fc_value_string(Session("ses_i_language"), "var_java_36")%>";
		theForm.str_pw.style.backgroundColor = str_color_red;
		theForm.str_pw_confirm.style.backgroundColor = str_color_red;
	}
	
	if (theForm.str_User_First_Name.value == "")
	{
		//strFehler += str_info_68;
		strFehler +="<%= fc_value_string(Session("ses_i_language"), "var_java_52")%>";
		theForm.str_User_First_Name.style.backgroundColor = str_color_red;
	}
	else
	{
		theForm.str_User_First_Name.style.backgroundColor = "";
	}

	if (theForm.str_User_Last_Name.value == "")
	{
		//strFehler += str_info_69;
		strFehler +="<%= fc_value_string(Session("ses_i_language"), "var_java_53")%>";
		theForm.str_User_Last_Name.style.backgroundColor = str_color_red;
	}
	else
	{
		theForm.str_User_Last_Name.style.backgroundColor = "";
	}
	
	if (theForm.LST_ethnic.value == "0")
	{
		//strFehler += str_info_70;
		strFehler +="<%= fc_value_string(Session("ses_i_language"), "var_java_83")%>";
		theForm.LST_ethnic.style.backgroundColor = str_color_red;
	}
	else
	{
		theForm.LST_ethnic.style.backgroundColor = "";
	}


	if (theForm.LST_Gender.value == "0")
	{
		//strFehler += str_info_71;
		strFehler +="<%= fc_value_string(Session("ses_i_language"), "var_java_54")%>";
		theForm.LST_Gender.style.backgroundColor = str_color_red;
	}
	else
	{
		theForm.LST_Gender.style.backgroundColor = "";
	}

	//alert(theForm.LST_sport_01.value)
	//29 = please select in der Tabelle
	//if (theForm.LST_sport_01.value == "29")
	//if (theForm.LST_sport_01.value == "0")
	if (theForm.LST_sport_01.value == "29" || theForm.LST_sport_01.value == "0")
	{
		//strFehler += str_info_83;
		strFehler +="<%= fc_value_string(Session("ses_i_language"), "var_java_84")%>";
		theForm.LST_sport_01.style.backgroundColor = str_color_red;
	}
	else
	{
		theForm.LST_sport_01.style.backgroundColor = "";
	}
	
	if (theForm.LST_i_measured_sytem_athlete.value == "0")
	{
		//strFehler += str_info_72;
		strFehler +="<%= fc_value_string(Session("ses_i_language"), "var_java_85")%>";
		theForm.LST_i_measured_sytem_athlete.style.backgroundColor = str_color_red;
	}
	else
	{
		theForm.LST_i_measured_sytem_athlete.style.backgroundColor = "";
	}

//mutter	
	if (theForm.LST_i_measured_sytem_mother.value == "0" && theForm.ckk_i_mother_default.checked == false)
	{
		//strFehler += str_info_73;
		strFehler +="<%= fc_value_string(Session("ses_i_language"), "var_java_86")%>";
		theForm.LST_i_measured_sytem_mother.style.backgroundColor = str_color_red;
	}
	else
	{
		theForm.LST_i_measured_sytem_mother.style.backgroundColor = "";
	}

//Vater	
	if (theForm.LST_i_measured_sytem_father.value == "0" && theForm.ckk_i_father_default.checked == false)
	{
		//strFehler += str_info_74;
		strFehler +="<%= fc_value_string(Session("ses_i_language"), "var_java_87")%>";
		theForm.LST_i_measured_sytem_father.style.backgroundColor = str_color_red;
	}
	else
	{
		theForm.LST_i_measured_sytem_father.style.backgroundColor = "";
	}
	
//	if (theForm.LST_Bodyheight_Mother.value == "0")
//	{
//		strFehler += str_info_75;
//	}
//	
//	if (theForm.LST_Bodyheight_Father.value == "0")
//	{
//		strFehler += str_info_76;
//	}
	
	if (theForm.LST_Country.value == "0")
	{
		//strFehler += str_info_77;
		strFehler +="<%= fc_value_string(Session("ses_i_language"), "var_java_47")%>";
		theForm.LST_Country.style.backgroundColor = str_color_red;
	}
	else
	{
		theForm.LST_Country.style.backgroundColor = "";
	}

	if (theForm.str_User_email.value == "")
	{
		//strFehler += str_info_78;
		strFehler +="<%= fc_value_string(Session("ses_i_language"), "var_java_48")%>";
		theForm.str_User_email.style.backgroundColor = str_color_red;
	}
	else
	{
		theForm.str_User_email.style.backgroundColor = "";
	}

	if (theForm.str_User_email_confirm.value == "")
	{
		//strFehler += str_info_79;
		strFehler +="<%= fc_value_string(Session("ses_i_language"), "var_java_49")%>";
		theForm.str_User_email_confirm.style.backgroundColor = str_color_red;
	}
	else
	{
		theForm.str_User_email_confirm.style.backgroundColor = "";
	}
	
	if (theForm.str_User_email.value != theForm.str_User_email_confirm.value)
	{
		//strFehler += str_info_80;
		strFehler +="<%= fc_value_string(Session("ses_i_language"), "var_java_50")%>";
		theForm.str_User_email.style.backgroundColor = str_color_red;
		theForm.str_User_email_confirm.style.backgroundColor = str_color_red;
	}

// überprüft ob die ersten zwei zeichen "EO" sind
// str_first_log >>> constante
//var str_user_input = (theForm.str_User_id.value);
//var str_first_back = str_user_input.substring(0, 3);
//
//	if (str_first_back == str_first_log)
//	{
//		strFehler += str_info_all_01;
//		theForm.str_User_id.style.backgroundColor = str_color_red;
//	}

// überprüft die zeichenlänge user id und pw
	if (theForm.str_User_id.value.length<4)
	{
		//strFehler += str_info_81;
		strFehler +="<%= fc_value_string(Session("ses_i_language"), "var_java_37")%>";
		theForm.str_User_id.style.backgroundColor = str_color_red;
	}

	if (theForm.str_pw.value.length<8)
	{
		//strFehler += str_info_82;
		strFehler +="<%= fc_value_string(Session("ses_i_language"), "var_java_38")%>";
		theForm.str_pw.style.backgroundColor = str_color_red;
	}

//altersberechnung - nur wenn i_measured = 0 >> solange es noch keine messung gibt
get_alter();
//document.frm_value.i_measured.value="0"
//theForm.i_measured.value="0"
var i_measured = theForm.i_measured.value;
//alert(i_measured);
	//var str_info_201a = "Das hoechste Alter fuer GROWMETRY.com ist:  "; >> var_java_88
	//var str_info_201b = " – ihr Alter ist = "; >> var_java_89
	//var str_info_201c = " – bitte pruefen sie die Angabe ihres Geburtstages\n"; >> var_java_90
	//var str_info_202a = "Das juengste Alter fuer GROWMETRY.COM ist:  "; >> var_java_91

	var var_info_201a = "<%= fc_value_string(Session("ses_i_language"), "var_java_88")%>"
	var var_info_201b = "<%= fc_value_string(Session("ses_i_language"), "var_java_89")%>"
	var var_info_201c = "<%= fc_value_string(Session("ses_i_language"), "var_java_90")%>"
	var var_info_202a = "<%= fc_value_string(Session("ses_i_language"), "var_java_91")%>"


	//mindestalter
	if ((i_alter_max < get_alter_year) && (i_measured==0))
	{
		strFehler +=var_info_201a + i_alter_max + var_info_201b + get_alter_year + var_info_201c;
	}

	if ((i_alter_min > get_alter_year) && (i_measured==0))
	{
		strFehler +=var_info_202a + i_alter_min + var_info_201b + get_alter_year + var_info_201c;
	}


	if (strFehler.length>0)
	{
	//alert("Festgestellte Probleme: \n\n"+strFehler);
	//alert(str_info_63+strFehler);
	var msg_info01="<%= fc_value_string(Session("ses_i_language"), "var_java_30")%>";
	alert(msg_info01+strFehler);
	return(false);
	}

} 

function gueltigesDatum (datum)
{
//return 0 oder return 1
//0=False
//1=True
//(Schritt 1) Fehlerbehandlung
 if (!datum) return 0;
 datum=datum.toString();

//(Schritt 2) Aufspaltung des Datums
 datum=datum.split("-");
 if (datum.length!=3) return 0;

//(Schritt 3) Entfernung der fuehrenden Nullen und Anpassung des Monats
 datum[0]=parseInt(datum[0],10);
 datum[1]=parseInt(datum[1],10)-1;

//(Schritt 4) Behandlung Jahr nur zweistellig
 if (datum[2].length==2) datum[2]="20"+datum[2];

//(Schritt 5)??††x? Erzeugung eines neuen Dateobjektes
 var kontrolldatum=new Date(datum[2],datum[1],datum[0]);

//übergibt das kontrollierte datum 
 dt_birthday = kontrolldatum;
 
//(Schritt 6) Vergleich, ob das eingegebene Datum gleich dem JS-Datum ist
 if (kontrolldatum.getDate()==datum[0] && kontrolldatum.getMonth()==datum[1] && kontrolldatum.getFullYear()==datum[2])
     return 1; else return 0;

}
//--></script>
<% 
'----------------------------------------------------------------------
'werden auf org nicht wirklich benötigt
Dim lng_fk_user_group
Dim lng_k_id 
Dim str_User_id
Dim str_pw 
Dim str_pw_confirm
Dim str_User_First_Name
Dim str_User_Last_Name
Dim str_User_email
Dim str_User_email_confirm
Dim str_User_email_02
Dim i_fk_status
Dim lng_fk_country

Dim dt_birthday
Dim i_zaehler_date
Dim i_day
Dim i_year
Dim i_month

Dim lng_fk_ethnic
Dim lng_fk_gender
Dim lng_fk_athlete
Dim str_logfree 'ob userid und pw ok sind - A1 > nein - A0 >> ok
Dim i_fk_date_format

Dim i_len_userid
Dim i_len_pw
Dim i_len_ses_userid
Dim i_len_ses_pw

Dim lng_fk_User_ID_create'der user der den datensatz angelegt hat
Dim str_User_ID_create
Dim dt_create
Dim str_createinfo
Dim lng_fk_User_ID_update'der user der den datensatz verändert hat
Dim str_User_ID_update
Dim dt_update
Dim str_updateinfo
Dim i_emails_no'1>> yes 2>>no
i_emails_no = Request("ckk_i_emails_no")
If i_emails_no = "checkbox" Then
	i_emails_no = 1
else
	i_emails_no = 2
end if

Dim queryStr
Dim SQL
Dim lst_wert	
Dim lst_string
Dim sqlCommand
Dim sqlCommand_02
Dim id
Dim sql_new
Dim sql_new_02
Dim nID'neue ID des datensatzes
Dim GetIDSQL 

Dim str_color_01'red
Dim str_color_02'grün
Dim str_color_default
str_color_01 = "#FF9B9B"
str_color_02 = "#DBFFB7"

Dim AP'>>>  Seitenindex der masterseite (all)
AP = Request ("ap")
If AP = "" Then
	AP = 1 
end if

Dim i_insert_error'0= kein fehler >0=fehler
'---------------------------------------------------------------------------------------------------------------------------------------
Dim trancd
Dim btnSub_01
Dim btnSub_02
Dim btnSub_03
Dim btnSub_04'PW ändern

Dim i_new_pw'0=NO - 1=Yes
i_new_pw = 0

'btnSub_01 = Save >> 1
'btnSub_02 = New Record >> 2
'btnSub_03 = Record Save >> 3
btnSub_01 = Request("btnSub_01") 
btnSub_02 = Request("btnSub_02") 
btnSub_03 = Request("btnSub_03") 
btnSub_04 = Request("btnSub_04") 

trancd = "A"'default

'Save - update
If Len(btnSub_01) > 0 and Len(btnSub_02) = 0 and Len(btnSub_03) = 0 and Len(btnSub_04) = 0 Then
	trancd = "S"
end if
'new record
If Len(btnSub_01) = 0 and Len(btnSub_02) > 0 and Len(btnSub_03) = 0 and Len(btnSub_04) = 0 Then
	trancd = "N"
end if
'speichert den neuen (nicht mehr leeren datensatz)
If Len(btnSub_01) = 0 and Len(btnSub_02) = 0 and Len(btnSub_03) > 0 and Len(btnSub_04) = 0 Then
	trancd = "R"
end if
'Passwort ändern
If Len(btnSub_01) = 0 and Len(btnSub_02) = 0 and Len(btnSub_03) = 0 and Len(btnSub_04) > 0 Then
	i_new_pw = 1''neue PW

'diese session gehören befüllt
'Session("ses_lpw_lng_k_email_inquiry")
'Session("ses_lpw_str_User_id")
'Test
Session("ses_lpw_lng_k_email_inquiry") = "2"
Session("ses_lpw_str_User_id") = "1032"
else
Session("ses_lpw_lng_k_email_inquiry") = NULL
Session("ses_lpw_str_User_id") = NULL
	
end if

Response.Write("i_new_pw: " & i_new_pw & "<br>")
Response.Write("ses_lpw_lng_k_email_inquiry: " & Session("ses_lpw_lng_k_email_inquiry") & "<br>")
Response.Write("ses_lpw_str_User_id: " & Session("ses_lpw_str_User_id") & "<br>")


'20100126 mit Grafik
'New Record >> N
'Change Master Access Code >> C
Dim input_grafik
input_grafik = Request("btnSub")
'Response.Write("#3 input_grafik: " & input_grafik & "<br>")

If trancd = "A" and Len(input_grafik) > 0 Then'möglicherweise wurde eine Grafik betätigt
	trancd = UCase(Left(Request("btnSub"),1))
	'Response.Write("#2 trancd: " & trancd & "<br>")
	'falls nicht betätigt wurde bleibt A
	'N > new record
	'C > change initial code
	'R > record save ... neuer datensatz speichern
	'S > save ... bestehnder datensatz speichern
	If instr("SR", trancd) = 0 Then
    	trancd = "A"
  	End If
End If
'---------------------------------------------------------------------------------------------------------------------------------------
'berechnet das min. geburtsjahr - derzeit min 5 jahre
'berechnet das max. geburtsjahr - derzeit min 21 jahre ...bzw. 22 Jhare das heit 21 jahre 11 monate 30 tage 
Dim i_year_now
Dim i_year_start
Dim i_year_end

i_year_now = Year(Now())

If trancd = "N" Then'nur bei der erstanlage
'	i_year_start = i_year_now - i_year_min 
'	i_year_end = i_year_now - i_year_max 
	i_year_end = i_year_now - i_year_min 
	i_year_start = i_year_now - i_year_max 	
	
else
	i_year_start = 1988
	i_year_end = i_year_now
end if

'Response.Write("i_year_start: " & i_year_start & "<br>")
'Response.Write("i_year_end: " & i_year_end & "<br>")
'---------------------------------------------------------------------------------------------------------------------------------------
Dim i_error
Dim id_dyna'die datensatz des zu bearbeiteten datensatzes
	id_dyna = Request("id_0501")
'Response.Write("id_dyna: " & id_dyna & "<br>")
'Response.End()
'----------------------------------------------------------------------
'wenn <i_info> = 0 >> iu >> ist die einegloggte id
'wenn <i_info> = 1 >> id >> dann ist die einegloggte id eine andere
'zb. wenn ein übergeordnete id einen detaildatensatz <zwick >> org> anschauen will
Dim i_info
i_info = Request("i_info")
'Response.Write("i_info: " & i_info & "<br>")

	If IsNull(i_info) or IsEmpty(i_info) Then
		i_info = 0
	end if

	if Cint(i_info) = 0 Then
		id_dyna = iu'Request("lng_k_id")	
	end if
	if Cint(i_info) = 1 Then
		id_dyna = Request("id_0501")
	end if
'Response.Write("id_dyna: " & id_dyna & "<br>")
'---------------------------------------------------------------------------------
'wenn ein nicht trainer angemeldet ist muss für diese seite coach id ermittelt werden
Dim lng_fk_trainer
If isx = 5 or isx = 0 Then'isx = 3 >> neue coach stammdateneingabe übers login
	lng_fk_trainer = Session("ses_i_trainer")
end if

Dim str_trainer_name'tabelle tbl_0301_trainer
str_trainer_name = fc_get_name_trainer(lng_fk_trainer , 1)'id_dyna >> die id von der tabelle <tbl_0501_user>
'Response.Write("str_trainer_name: " & str_trainer_name & "<br>")
'---------------------------------------------------------------------------------
Dim str_head_organization
Dim lng_fk_head_organization'>> der fremdschlüssel zur organization <tbl_0190_head_organization> ...
	
	If lng_fk_user_group_ses = 5 Then
		lng_fk_head_organization = Session("ses_i_head_org")
	end if

'Response.Write("lng_fk_head_organization: " & lng_fk_head_organization & "<br>")
'response.End()
	
'ermittelt den namen der head org
str_head_organization = fc_str_head_org(lng_fk_head_organization)

Dim str_division
Dim lng_fk_organization

	If lng_fk_user_group_ses = 5 Then
		lng_fk_organization = Session("ses_i_org")
	end if

	If i_ses_i_dummy_head_org = 0 Then
		'str_division = fc_get_name_org(lng_fk_head_organization, 4)
		str_division = fc_get_name_org(lng_fk_organization, 3)'id_dyna >> die id von der tabelle <tbl_0501_user>
		'Response.Write("lng_fk_organization: " & lng_fk_organization & "<br>")
	else
		str_division = ""
	end if
'variable beschriftung für die checkbox copy ...
'1 >> alle felder sichtbar
'0 >> owner teil wird ausgebelndet

'Response.Write("iu: " & iu & "<br>")
'Response.Write("i_ses_i_dummy_head_org: " & i_ses_i_dummy_head_org & "<br>")

Dim str_menu_01'menüleiste

'My Golf Inc. » Juniors 15-18 » Your Profile
If i_ses_i_dummy_head_org=0 Then'nur wenn es keine dummy ist
	'str_menu_01 = Session("ses_str_head_org") & " " & Session("ses_str_org") & " | Ihr Benutzer-Profil"
	str_menu_01 = " Ihr Benutzer-Profil"
end if

If i_ses_i_dummy_head_org=1 Then' wenn es eine dummy ist
	'str_menu_01 = str_trainer_name & " | Ihr Benutzer-Profil"
	str_menu_01 = " Ihr Benutzer-Profil"
end if		

'Email-----------------------------------------------------------------------------------------------------------
Dim str_emaillink
Dim sqlStr
Dim i_pw_loop
Dim i_str_emaillink

Dim lng_fk_sport_01
Dim lng_fk_sport_02
Dim lng_fk_sport_03
'Größenerfassung--------------------------------------------------------------------------------------------------
'Athlete
Dim i_fk_measured_system_athlete
Dim lng_fk_cm_athlete
Dim lng_fk_cm_deci_athlete
Dim lng_kg_athlete
Dim lng_fk_feet_athlete
Dim lng_fk_inch_athlete
Dim lng_fk_eighths_inch_athlete 
Dim lng_fk_sixteenth_inch_athlete
Dim lng_fk_thirtysecond_inch_athlete
Dim lng_fk_lbs

'Mother
Dim i_fk_measured_system_mother
Dim lng_fk_cm_mother
Dim lng_fk_cm_deci_mother
Dim lng_fk_feet_mother
Dim lng_fk_inch_mother
Dim lng_fk_eighths_inch_mother 
Dim lng_fk_sixteenth_inch_mother
Dim lng_fk_thirtysecond_inch_mother

'Father
Dim i_fk_measured_system_father
Dim lng_fk_cm_father
Dim lng_fk_cm_deci_father
Dim lng_fk_feet_father
Dim lng_fk_inch_father
Dim lng_fk_eighths_inch_father 
Dim lng_fk_sixteenth_inch_father
Dim lng_fk_thirtysecond_inch_father

Dim dbl_measured_mm_athlete
Dim dbl_measured_mm_mother
Dim dbl_measured_mm_father
Dim dbl_measured_kg

'zum anzeigen der werte
Dim dbl_measured_mm_value_athlete
Dim dbl_measured_mm_value_mother
Dim dbl_measured_mm_value_father
Dim dbl_measured_kg_value_athlete

'----------------------------------------------------------------------
'überprüft ob es schon eine messung gegeben hat - dann werden gewisse eingaben gesperrt
'20110602 - nachträglich kann man jetzt alle daten ändern (lt. Hans)
Dim i_measured
i_measured = 0 'Default

'queryStr = "SELECT COUNT(1) AS i_measured FROM tbl_0802_athlete_calculated WHERE lng_fk_User_ID ='" & id_dyna & "' AND i_fk_measured_type ='4'"
''Response.Write("queryStr: " & queryStr & "<br>")
'Set rst_tmp = Server.CreateObject("ADODB.Recordset")
'
'rst_tmp.Open queryStr, objConn, adOpenStatic, adLockReadOnly   
'	i_measured = Cint(rst_tmp.Fields("i_measured"))
'rst_tmp.Close
'set rst_tmp  = nothing

'----------------------------------------------------------------------
'20110409
'Dim i_count_calculation
'i_count_calculation = 0 'default
'lng_fk_athlete = Session("ses_i_athlete")
''überprüft ob schon eine Kalkulation für die Grafik getätigt wurde
'queryStr = "SELECT i_count_calculation FROM tbl_0401_athlete WHERE lng_k_athlete ='" & lng_fk_athlete & "'"
''Response.Write("queryStr: " & queryStr & "<br>")
'Set rst_tmp = Server.CreateObject("ADODB.Recordset")
'
'rst_tmp.Open queryStr, objConn, adOpenStatic, adLockReadOnly   
'	i_count_calculation = rst_tmp.Fields("i_count_calculation")
'rst_tmp.Close
'set rst_tmp  = nothing
'
''die variablendefinition <i_count_calculation> bleibt weil im script überall verwendet wird
'i_measured = i_count_calculation
'i_measured = 0

'----------------------------------------------------------------------
'Default Größe der Eltern
Dim i_count_groesse
Dim i_mother_default
Dim i_father_default

    Select Case trancd
    	
    	Case "A"
             queryStr = "SELECT * FROM tbl_0501_user WHERE lng_k_User_ID = " &  id_dyna
      
 	    Case "S"'update.....
	
					'liest die felder ein
					lng_k_id = id_dyna'Request("ID")
					str_User_id= Request("str_User_id")
					str_pw = Request("str_pw")
					str_pw_confirm = Request("str_pw_confirm")
					str_User_First_Name = Request("str_User_First_Name")
					str_User_Last_Name = Request("str_User_Last_Name")
					str_User_email = Request("str_User_email")
					str_User_email_02 = Request("str_User_email_02")
					i_fk_status = Request("LST_Status")
					'wenn unsichtbar
					If IsNull(i_fk_status) or IsEmpty(i_fk_status) Then
						i_fk_status = 1 'Aktiv
					end if
					lng_fk_country = Request("LST_Country")
					
					lng_fk_sport_01 = Request("LST_sport_01")
					lng_fk_sport_02 = Request("LST_sport_02")
					lng_fk_sport_03 = Request("LST_sport_03")

					'1	dd.mm.yyyy
					'2	mm.dd.yyyy
					i_fk_date_format = Request("LST_date_format")
					dt_birthday = Request("dt_birthday")
					
					lng_fk_ethnic = Request("LST_ethnic")
					lng_fk_gender = Request("LST_Gender")
					
					i_emails_no = Request("ckk_i_emails_no")

					If i_emails_no = "checkbox" Then
						i_emails_no = 1
					else
						i_emails_no = 2
					end if
					
					'ob userid und pw ok sind - A1 >> nein - A0 >> ok
					i_len_userid = Len(str_User_id)
					i_len_pw = len(str_pw)
					i_len_ses_userid = Session("ses_userid_len")
					i_len_ses_pw = Session("ses_pw_len")
					
					i_insert_error = 0'default
					
					If Cint(i_len_userid) >= Cint(i_len_ses_userid) and Cint(i_len_pw) >= Cint(i_len_ses_pw) Then
						'******************************************************************************
						' überprüft ob die zugangsdaten (userid und pw) eindeutig sind
						' InputParameter:
						' i_check ... 0 >> es wird nur überprüft ob die user id eindeutig ist / 1 >> user id und pw müssen zusammen eindeutig sein
						' str_User_id ... die eingegebene user id
						' str_pw ... das eingegebene passwort
						' lng_k_User_ID ... der aktuelle user
						' i_info ... ob es eine neuanlage ist (0) oder schon ein bestehender user ist (1)
						'******************************************************************************
						'ob userid und pw ok sind - A1 >> nein - A0 >> ok
						'Function fc_str_check_logindata(i_check, str_User_id, str_pw, lng_k_User_ID, i_info)
						str_logfree  = fc_str_check_logindata(0, str_User_id, str_pw, id_dyna, 1)
						'Response.Write("#1str_logfree: & " & str_logfree)
						'Response.end()
					else
						str_logfree = "A1"
					end if
					
					'Your login details are not correct! Please change your USER ID or PASSWORD!
					If str_logfree = "A1" Then
						i_insert_error = 16
						'call showMessage(Con_Msg_16 & " " & i_len_ses_userid & " " & Con_Msg_16b & " " & i_len_ses_pw)
					end if
					
					'Passwort wird überprüft
					If str_pw <> str_pw_confirm Then
						str_logfree = "A1"
						i_insert_error = 16
						'call showMessage(Con_Msg_17)'That was <Password> entering your <PASSWORD CONFIRM> not properly confirmed!
					end if
					
					'wandelt ein einfaches Hochkomma um für den SQL-Statement um	
					str_User_id= fc_check_string_replace(str_User_id, 0)
					str_pw = fc_check_string_replace(str_pw, 0)
					str_pw_confirm = fc_check_string_replace(str_pw_confirm, 0)
					str_User_First_Name = fc_check_string_replace(str_User_First_Name, 0)
					str_User_Last_Name = fc_check_string_replace(str_User_Last_Name, 0)
					str_User_email = fc_check_string_replace(str_User_email, 0)
					str_User_email_02 = fc_check_string_replace(str_User_email_02, 0)

					'Defaultgrößen
					i_mother_default = Request("ckk_i_mother_default")
					'wenn die checkbox aktiviert ist ....
					If i_mother_default = "checkbox" Then
						i_mother_default = 1
					else
						i_mother_default = 0	
					end if
					
					i_father_default = Request("ckk_i_father_default")
					'wenn die checkbox aktiviert ist ....
					If i_father_default = "checkbox" Then
						i_father_default = 1
					else
						i_father_default = 0	
					end if
										
'wandelt das datum um------------------------------------------------------------------------------------------------
'2009 05 23 Popup Datum (Form)	
					dt_birthday = fc_str_date_Server_format(dt_birthday, 4)

					'wenn es schon messung gegeben hat dann werden nicht mehr alle daten abgespeichert	
'					If i_measured > 0 Then 			
'						sqlCommand = "UPDATE tbl_0501_user SET " & _
'							"str_User_id= '" & str_User_id& "'" & _
'							", str_pw = '" & str_pw & "'" & _
'							", i_fk_date_format = '" & i_fk_date_format & "'" & _
'							", str_User_email = '" & str_User_email & "'" & _
'							", str_User_email_02 = '" & str_User_email_02 & "'" & _
'							", i_emails_no = '" & i_emails_no & "'" & _
'							", i_fk_status = '" & i_fk_status & "'" & _
'							", lng_fk_sport_01 = '" & lng_fk_sport_01  & "'" & _
'							", lng_fk_sport_02 = '" & lng_fk_sport_02 & "'" & _
'							", lng_fk_sport_03 = '" & lng_fk_sport_03 & "'" & _
'							", lng_fk_User_ID_update = '" & iu & "'" & _
'							", dt_update = '" & fc_str_date_server_format(Now(), 4) & "'" & _
'							" WHERE lng_k_User_ID ="  & id_dyna
'					end if 

					'noch keine messung alle daten können noch geändert werden
					'20110602 - nachträglich kann man jetzt alle daten ändern
					i_measured = 0
					
					If i_measured = 0 Then		
						sqlCommand = "UPDATE tbl_0501_user SET " & _
							"str_User_id= '" & str_User_id& "'" & _
							", str_pw = '" & str_pw & "'" & _
							", str_User_First_Name = '" & str_User_First_Name & "'" & _
							", str_User_Last_Name = '" & str_User_Last_Name & "'" & _
							", i_fk_date_format = '" & i_fk_date_format & "'" & _
							", dt_birthday = '" & dt_birthday & "'" & _
							", lng_fk_ethnic = '" & lng_fk_ethnic & "'" & _
							", lng_fk_gender = '" & lng_fk_gender & "'" & _
							", str_User_email = '" & str_User_email & "'" & _
							", str_User_email_02 = '" & str_User_email_02 & "'" & _
							", i_emails_no = '" & i_emails_no & "'" & _
							", lng_fk_country = '" & lng_fk_country & "'" & _
							", i_fk_status = '" & i_fk_status & "'" & _
							", lng_fk_sport_01 = '" & lng_fk_sport_01  & "'" & _
							", lng_fk_sport_02 = '" & lng_fk_sport_02 & "'" & _
							", lng_fk_sport_03 = '" & lng_fk_sport_03 & "'" & _
							", lng_fk_User_ID_update = '" & iu & "'" & _
							", dt_update = '" & fc_str_date_server_format(Now(), 4) & "'" & _
							", i_mother_default = '" & i_mother_default & "'" & _
							", i_father_default = '" & i_father_default & "'" & _
							" WHERE lng_k_User_ID ="  & id_dyna
					end if 

						'Response.Write(sqlCommand & "<br>")
						If str_logfree = "A0" Then
							'Response.Write(sqlCommand & "<br>")
							'Response.end()
							objConn.Execute sqlCommand
							Session("str_logfree") = str_logfree
						end if

'20110602 hier wird überprüft ob es schon eine erste Größeneingabe gibt -------------------------------------------------------------------------------------------------------------
'falls nicht wirde diese jetzt nachträglich angelegt
'denn das update findet sonst die user ID nicht
'update wird anschliessend durchgeführt

'i_fk_measured_type
'1	Master Athlete
'2	Master Mother
'3	Master Father

i_count_groesse = 0 'default
queryStr = "SELECT COUNT(1) AS i_count_groesse FROM tbl_0801_athlete_measured WHERE lng_fk_User_ID ='" & id_dyna & "' AND i_fk_measured_type ='1'"
Set rst_tmp = Server.CreateObject("ADODB.Recordset")

rst_tmp.Open queryStr, objConn, adOpenStatic, adLockReadOnly   
	i_count_groesse = Cint(rst_tmp.Fields("i_count_groesse"))
rst_tmp.Close
set rst_tmp  = nothing

If i_count_groesse = 0 Then'dann wird ein leerer datensatz angelegt

'Athlete wird proforma angelegt - nachträglich mit dem Update wird aktualisiert
	sql_new = "INSERT INTO tbl_0801_athlete_measured " & _
	 "(" & _
			" lng_fk_User_ID" & _
			", dt_measured" & _
			", i_fk_measured_type" & _
			", i_measured_series" & _
			", i_fk_measured_system" & _
			", lng_fk_cm" & _
			", lng_fk_cm_deci" & _
			", lng_fk_feet" & _
			", lng_fk_inch" & _
			", lng_fk_eighths_inch" & _
			", lng_fk_sixteenth_inch" & _
			", lng_fk_thirtysecond_inch" & _
			", lng_fk_kg" & _
			", lng_fk_kg_deci" & _
			", lng_fk_lbs" & _
			", i_fk_status" & _
			", dt_update" & _
	  ") VALUES ('" & id_dyna & "'" & _
			", '" & fc_str_date_server_format(Now(), 4) & "'" & _
			", '" & 1 & "'" & _
			", '" & 1 & "'" & _
			", '" & i_fk_measured_system_athlete & "'" & _
			", '" & 0 & "'" & _
			", '" & 0 & "'" & _
			", '" & 0 & "'" & _
			", '" & 0 & "'" & _
			", '" & 0 & "'" & _
			", '" & 0 & "'" & _
			", '" & 0 & "'" & _
			", '" & 0 & "'" & _
			", '" & 0 & "'" & _
			", '" & 0 & "'" & _
			", '" & 1 & "'" & _
			", '" & fc_str_date_server_format(Now(), 4) & "'" & _
	 ")"
	
	sql_new_02 = "INSERT INTO tbl_0802_athlete_calculated  " & _
	 "(" & _
			" lng_fk_User_ID" & _
			", dt_measured" & _
			", i_fk_measured_type" & _
			", dbl_measured_mm" & _
			", dbl_measured_kg" & _
	  ") VALUES ('" & id_dyna & "'" & _
			", '" & fc_str_date_server_format(Now(), 4) & "'" & _
			", '" & 1 & "'" & _
			", '" & 0 & "'" & _
			", '" & 0 & "'" & _
	 ")"
	
	objConn.Execute sql_new
	objConn.Execute sql_new_02	
end if

'mutter -----------------------------
i_count_groesse = 0 'default
'überprüft ob schon eine Kalkulation für die Grafik getätigt wurde
queryStr = "SELECT COUNT(1) AS i_count_groesse FROM tbl_0801_athlete_measured WHERE lng_fk_User_ID ='" & id_dyna & "' AND i_fk_measured_type ='2'"
Set rst_tmp = Server.CreateObject("ADODB.Recordset")
rst_tmp.Open queryStr, objConn, adOpenStatic, adLockReadOnly   
	i_count_groesse = Cint(rst_tmp.Fields("i_count_groesse"))
rst_tmp.Close
set rst_tmp  = nothing

If i_count_groesse = 0 Then'dann wird ein leerer datensatz angelegt

		sql_new = "INSERT INTO tbl_0801_athlete_measured " & _
		 "(" & _
				" lng_fk_User_ID" & _
				", dt_measured" & _
				", i_fk_measured_type" & _
				", i_measured_series" & _
				", i_fk_measured_system" & _
				", lng_fk_cm" & _
				", lng_fk_cm_deci" & _
				", lng_fk_feet" & _
				", lng_fk_inch" & _
				", lng_fk_eighths_inch" & _
				", lng_fk_sixteenth_inch" & _
				", lng_fk_thirtysecond_inch" & _
				", lng_fk_kg" & _
				", lng_fk_kg_deci" & _
				", lng_fk_lbs" & _
				", i_fk_status" & _
				", dt_update" & _
		  ") VALUES ('" & id_dyna & "'" & _
				", '" & fc_str_date_server_format(Now(), 4) & "'" & _
				", '" & 2 & "'" & _
				", '" & 1 & "'" & _
				", '" & i_fk_measured_system_mother & "'" & _
				", '" & 0 & "'" & _
				", '" & 0 & "'" & _
				", '" & 0 & "'" & _
				", '" & 0 & "'" & _
				", '" & 0 & "'" & _
				", '" & 0 & "'" & _
				", '" & 0 & "'" & _
				", '" & 0 & "'" & _
				", '" & 0 & "'" & _
				", '" & 0 & "'" & _
				", '" & 1 & "'" & _
				", '" & fc_str_date_server_format(Now(), 4) & "'" & _
		 ")"

		sql_new_02 = "INSERT INTO tbl_0802_athlete_calculated  " & _
		 "(" & _
				" lng_fk_User_ID" & _
				", dt_measured" & _
				", i_fk_measured_type" & _
				", dbl_measured_mm" & _
				", dbl_measured_kg" & _
		  ") VALUES ('" & id_dyna & "'" & _
				", '" & fc_str_date_server_format(Now(), 4) & "'" & _
				", '" & 2 & "'" & _
				", '" & 0 & "'" & _
				", '" & 0 & "'" & _
		 ")"

	objConn.Execute sql_new
	objConn.Execute sql_new_02	

end if
'vater ---------------------------------------------------------
i_count_groesse = 0 'default
queryStr = "SELECT COUNT(1) AS i_count_groesse FROM tbl_0801_athlete_measured WHERE lng_fk_User_ID ='" & id_dyna & "' AND i_fk_measured_type ='3'"

Set rst_tmp = Server.CreateObject("ADODB.Recordset")
rst_tmp.Open queryStr, objConn, adOpenStatic, adLockReadOnly   
	i_count_groesse = Cint(rst_tmp.Fields("i_count_groesse"))
rst_tmp.Close
set rst_tmp  = nothing

If i_count_groesse = 0 Then'dann wird ein leerer datensatz angelegt

	sql_new = "INSERT INTO tbl_0801_athlete_measured " & _
	 "(" & _
			" lng_fk_User_ID" & _
			", dt_measured" & _
			", i_fk_measured_type" & _
			", i_measured_series" & _
			", i_fk_measured_system" & _
			", lng_fk_cm" & _
			", lng_fk_cm_deci" & _
			", lng_fk_feet" & _
			", lng_fk_inch" & _
			", lng_fk_eighths_inch" & _
			", lng_fk_sixteenth_inch" & _
			", lng_fk_thirtysecond_inch" & _
			", lng_fk_kg" & _
			", lng_fk_kg_deci" & _
			", lng_fk_lbs" & _
			", i_fk_status" & _
			", dt_update" & _
	  ") VALUES ('" & id_dyna & "'" & _
			", '" & fc_str_date_server_format(Now(), 4) & "'" & _
			", '" & 3 & "'" & _
			", '" & 1 & "'" & _
			", '" & i_fk_measured_system_father & "'" & _
			", '" & 0 & "'" & _
			", '" & 0 & "'" & _
			", '" & 0 & "'" & _
			", '" & 0 & "'" & _
			", '" & 0 & "'" & _
			", '" & 0 & "'" & _
			", '" & 0 & "'" & _
			", '" & 0 & "'" & _
			", '" & 0 & "'" & _
			", '" & 0 & "'" & _
			", '" & 1 & "'" & _
			", '" & fc_str_date_server_format(Now(), 4) & "'" & _
	 ")"

	sql_new_02 = "INSERT INTO tbl_0802_athlete_calculated  " & _
	 "(" & _
			" lng_fk_User_ID" & _
			", dt_measured" & _
			", i_fk_measured_type" & _
			", dbl_measured_mm" & _
			", dbl_measured_kg" & _
	  ") VALUES ('" & id_dyna & "'" & _
			", '" & fc_str_date_server_format(Now(), 4) & "'" & _
			", '" & 3 & "'" & _
			", '" & 0 & "'" & _
			", '" & 0 & "'" & _
	 ")"

	objConn.Execute sql_new
	objConn.Execute sql_new_02	
end if
						
'größenerfassung athlete------------------------------------------------------------------------------------------------------------------------------------------------
						'i_fk_measured_type
						'1	Master Athlete
						'2	Master Mother
						'3	Master Father
						'4	Calculate Athlete
						
						'i_measured_series
						'1 >> erste messreihe bzw. Stammdatenmessung
						'2 >> zweite messreihe
						'3 >> dritte messreihe
						
						'i_fk_measured_system_athlete
						'0	+++please select+++	
						'1	metric				
						'2	feet - inch -1/8	
						'3	feet - inch -1/16	
						'4	feet - inch -1/32	
						
						i_fk_measured_system_athlete = Request("LST_i_measured_sytem_athlete")
						
						If i_fk_measured_system_athlete = 1 Then'metric
							lng_fk_cm_athlete = Request("LST_cm_athlete")
							lng_fk_cm_deci_athlete = Request("LST_cm_deci_athlete")
							lng_kg_athlete = Request("LST_kg")
							'******************************************************************************
							' gibt den metrischen wert zurück
							' InputParameter:
							' ID ... id des wertes in der tabelle
							'******************************************************************************
							'Function fc_get_metric_value(ID)
							dbl_measured_mm_athlete = fc_get_metric_value(lng_fk_cm_athlete)
								'Response.Write("1 ------ dbl_measured_mm_athlete: " & dbl_measured_mm_athlete & "<br>")
							dbl_measured_mm_athlete = (dbl_measured_mm_athlete ) + (fc_get_metric_value(lng_fk_cm_deci_athlete))
								'Response.Write("2 ------ dbl_measured_mm_athlete: " & dbl_measured_mm_athlete & "<br>")
							dbl_measured_mm_athlete = dbl_measured_mm_athlete * 10
								'Response.Write("3 ------ dbl_measured_mm_athlete: " & dbl_measured_mm_athlete & "<br>")
								'call showMessage("dbl_measured_mm_athlete: " & dbl_measured_mm_athlete)
							dbl_measured_kg = fc_get_metric_value(lng_kg_athlete)
								'call showMessage("dbl_measured_kg: " & dbl_measured_kg)
						end if
						
						If i_fk_measured_system_athlete = 2 Then'feet - inch -1/8	
							lng_fk_feet_athlete = Request("LST_feet_08_athlete")
							lng_fk_inch_athlete = Request("LST_inch_08_athlete")
							lng_fk_eighths_inch_athlete = Request("LST_eighths_inch_athlete")
							lng_fk_lbs = Request("LST_lbs")
							'******************************************************************************
							' gibt den metrischen wert zurück
							' InputParameter:
							' ID ... id des wertes in der tabelle
							'******************************************************************************
							'Function fc_get_metric_value(ID)
							dbl_measured_mm_athlete = fc_get_metric_value(lng_fk_feet_athlete)
							dbl_measured_mm_athlete = (dbl_measured_mm_athlete ) + (fc_get_metric_value(lng_fk_inch_athlete))
							dbl_measured_mm_athlete = (dbl_measured_mm_athlete ) + (fc_get_metric_value(lng_fk_eighths_inch_athlete))
								'call showMessage("dbl_measured_mm_athlete: " & dbl_measured_mm_athlete)
							dbl_measured_kg = fc_get_metric_value(lng_fk_lbs)
								'call showMessage("dbl_measured_kg: " & dbl_measured_kg)
						end if

						If i_fk_measured_system_athlete = 3 Then'feet - inch -1/16	
							lng_fk_feet_athlete = Request("LST_feet_16_athlete")
							lng_fk_inch_athlete = Request("LST_inch_16_athlete")
							lng_fk_sixteenth_inch_athlete = Request("LST_sixteenth_athlete")
							lng_fk_lbs = Request("LST_lbs")
							'******************************************************************************
							' gibt den metrischen wert zurück
							' InputParameter:
							' ID ... id des wertes in der tabelle
							'******************************************************************************
							'Function fc_get_metric_value(ID)
							dbl_measured_mm_athlete = fc_get_metric_value(lng_fk_feet_athlete)
							dbl_measured_mm_athlete = (dbl_measured_mm_athlete ) + (fc_get_metric_value(lng_fk_inch_athlete))
							dbl_measured_mm_athlete = (dbl_measured_mm_athlete ) + (fc_get_metric_value(lng_fk_sixteenth_inch_athlete))
								'call showMessage("dbl_measured_mm_athlete: " & dbl_measured_mm_athlete)
							dbl_measured_kg = fc_get_metric_value(lng_fk_lbs)
								'call showMessage("dbl_measured_kg: " & dbl_measured_kg)
						end if

						If i_fk_measured_system_athlete = 4 Then'feet - inch -1/32	
							lng_fk_feet_athlete = Request("LST_feet_32_athlete")
							lng_fk_inch_athlete = Request("LST_inch_32_athlete")
							lng_fk_thirtysecond_inch_athlete = Request("LST_thirtysecond_inch_athlete")
							lng_fk_lbs = Request("LST_lbs")
							'******************************************************************************
							' gibt den metrischen wert zurück
							' InputParameter:
							' ID ... id des wertes in der tabelle
							'******************************************************************************
							'Function fc_get_metric_value(ID)
							dbl_measured_mm_athlete = fc_get_metric_value(lng_fk_feet_athlete)
							dbl_measured_mm_athlete = (dbl_measured_mm_athlete ) + (fc_get_metric_value(lng_fk_inch_athlete))
							dbl_measured_mm_athlete = (dbl_measured_mm_athlete ) + (fc_get_metric_value(lng_fk_thirtysecond_inch_athlete))
								'call showMessage("dbl_measured_mm_athlete: " & dbl_measured_mm_athlete)
							dbl_measured_kg = fc_get_metric_value(lng_fk_lbs)
							'call showMessage("dbl_measured_kg: " & dbl_measured_kg)
							
						end if
						
						sqlCommand = "UPDATE tbl_0801_athlete_measured SET " & _
						"dt_measured = '" & fc_str_date_server_format(Now(), 4) & "'" & _
						", i_fk_measured_type = '" & 1 & "'" & _
						", i_measured_series = '" & 1 & "'" & _
						", i_fk_measured_system = '" & i_fk_measured_system_athlete & "'" & _
						", lng_fk_cm = '" & lng_fk_cm_athlete & "'" & _
						", lng_fk_cm_deci = '" & lng_fk_cm_deci_athlete & "'" & _
						", lng_fk_feet = '" & lng_fk_feet_athlete & "'" & _
						", lng_fk_inch = '" & lng_fk_inch_athlete & "'" & _
						", lng_fk_eighths_inch = '" & lng_fk_eighths_inch_athlete & "'" & _
						", lng_fk_sixteenth_inch = '" & lng_fk_sixteenth_inch_athlete & "'" & _
						", lng_fk_thirtysecond_inch = '" & lng_fk_thirtysecond_inch_athlete & "'" & _
						", lng_fk_kg = '" & lng_kg_athlete & "'" & _
						", lng_fk_kg_deci = '" & 0 & "'" & _
						", lng_fk_lbs = '" & lng_fk_lbs & "'" & _
						", i_fk_status = '" & 1 & "'" & _
						", lng_fk_User_ID_update = '" & iu & "'" & _
						", dt_update = '" & fc_str_date_server_format(Now(), 4) & "'" & _
						" WHERE lng_fk_User_ID = '"  & id_dyna & "'" & _
						" AND i_fk_measured_type = '" & 1 & "'"
						
						'der metrische wert wird abgespeichert
						'fc_check_value_replace(str_replace_string, i_default_len)
						dbl_measured_mm_athlete = fc_check_value_replace_comma(dbl_measured_mm_athlete, 1)
						dbl_measured_kg = fc_check_value_replace_comma(dbl_measured_kg, 1)
						
						sqlCommand_02 = "UPDATE tbl_0802_athlete_calculated SET " & _
						"dt_measured = '" & fc_str_date_server_format(Now(), 4) & "'" & _
						", dbl_measured_mm = '" & dbl_measured_mm_athlete & "'" & _
						", dbl_measured_kg = '" & dbl_measured_kg & "'" & _
						", lng_fk_User_ID_update = '" & iu & "'" & _
						" WHERE lng_fk_User_ID = '"  & id_dyna & "'" & _
						" AND i_fk_measured_type = '" & 1 & "'"
						
						'Response.Write(sqlCommand & "<br>")
						
						If id_dyna > 0 and i_fk_measured_system_athlete > 0 and str_logfree = "A0" Then
'							Response.Write(sqlCommand & "<br>")
'							Response.Write(sqlCommand_02 & "<br>")
							'Response.end()
							objConn.Execute sqlCommand
							objConn.Execute sqlCommand_02
							
'#5 SP von Andrey (20110523)----------------------------------------------------------------------------------------
						'Function =
						'  UPDATE acc_calculation
						'     SET ca_calc_status = 'Invalid'
						'       , ca_invalidate_date = NOW()
						'   WHERE ac_id = p_user_id
						'     AND mt_type = 1 /* measurement_type = height */
						'     AND ca_calc_date >= p_date_from;
						
						'personId is the value of lng_k_User_ID field from tbl_0501_user table
						'fromDate is the date in DD-MM-YYYY format
						
						'beispiel
						'CALL xINVALIDATE_CALCULATIONS(15, '16-04-2011')
						'sql_new = "CALL xINVALIDATE_CALCULATIONS(" & iu & ", '" & fc_str_date_server_format(Now(), 4) & "')"
						
'Änderung Andrey 20121114 >>> INVALIDATE_ALL_CALCULATIONS 
						sql_new = "CALL INVALIDATE_ALL_CALCULATIONS(" & iu & ", '" & fc_str_date_server_format(Now(), 3) & "')"

'						Response.Write("INVALIDATE_ALL_CALCULATIONS : " & sql_new & "<br>")
'						Response.End()
												
						objConn.Execute sql_new
'--------------------------------------------------------------------------------------------------------
							
						end if
						'Response.Write(sqlCommand & "<br>")

'größenerfassung mother----------------------------------------------------------
'noch keine messung alle daten können noch geändert werden
If i_measured = 0 Then	
						
						'i_fk_measured_type
						'1	Master mother
						'2	Master Mother
						'3	Master Father
						'4	Calculate Athlete
						
						'i_measured_series
						'1 >> erste messreihe bzw. Stammdatenmessung
						'2 >> zweite messreihe
						'3 >> dritte messreihe
						
						'i_fk_measured_system_mother
						'0	+++please select+++	
						'1	metric				
						'2	feet - inch -1/8	
						'3	feet - inch -1/16	
						'4	feet - inch -1/32	
						
						i_fk_measured_system_mother = Request("LST_i_measured_sytem_mother")
						
						If i_fk_measured_system_mother = 1 Then'metric
							lng_fk_cm_mother = Request("LST_cm_mother")
							lng_fk_cm_deci_mother = Request("LST_cm_deci_mother")

							'******************************************************************************
							' gibt den metrischen wert zurück
							' InputParameter:
							' ID ... id des wertes in der tabelle
							'******************************************************************************
							'Function fc_get_metric_value(ID)
							dbl_measured_mm_mother = fc_get_metric_value(lng_fk_cm_mother)
							dbl_measured_mm_mother = (dbl_measured_mm_mother ) + (fc_get_metric_value(lng_fk_cm_deci_mother))
							dbl_measured_mm_mother = dbl_measured_mm_mother * 10
								'call showMessage("dbl_measured_mm_mother: " & dbl_measured_mm_mother)
						end if
						
						If i_fk_measured_system_mother = 2 Then'feet - inch -1/8	
							lng_fk_feet_mother = Request("LST_feet_08_mother")
							lng_fk_inch_mother = Request("LST_inch_08_mother")
							lng_fk_eighths_inch_mother = Request("LST_eighths_inch_mother")

							'******************************************************************************
							' gibt den metrischen wert zurück
							' InputParameter:
							' ID ... id des wertes in der tabelle
							'******************************************************************************
							'Function fc_get_metric_value(ID)
							dbl_measured_mm_mother = fc_get_metric_value(lng_fk_feet_mother)
							dbl_measured_mm_mother = (dbl_measured_mm_mother ) + (fc_get_metric_value(lng_fk_inch_mother))
							dbl_measured_mm_mother = (dbl_measured_mm_mother ) + (fc_get_metric_value(lng_fk_eighths_inch_mother))
								'call showMessage("dbl_measured_mm_mother: " & dbl_measured_mm_mother)
						end if

						If i_fk_measured_system_mother = 3 Then'feet - inch -1/16	
							lng_fk_feet_mother = Request("LST_feet_16_mother")
							lng_fk_inch_mother = Request("LST_inch_16_mother")
							lng_fk_sixteenth_inch_mother = Request("LST_sixteenth_mother")

							'******************************************************************************
							' gibt den metrischen wert zurück
							' InputParameter:
							' ID ... id des wertes in der tabelle
							'******************************************************************************
							'Function fc_get_metric_value(ID)
							dbl_measured_mm_mother = fc_get_metric_value(lng_fk_feet_mother)
							dbl_measured_mm_mother = (dbl_measured_mm_mother ) + (fc_get_metric_value(lng_fk_inch_mother))
							dbl_measured_mm_mother = (dbl_measured_mm_mother ) + (fc_get_metric_value(lng_fk_sixteenth_inch_mother))
								'call showMessage("dbl_measured_mm_mother: " & dbl_measured_mm_mother)
						end if

						If i_fk_measured_system_mother = 4 Then'feet - inch -1/32	
							lng_fk_feet_mother = Request("LST_feet_32_mother")
							lng_fk_inch_mother = Request("LST_inch_32_mother")
							lng_fk_thirtysecond_inch_mother = Request("LST_thirtysecond_inch_mother")

							'******************************************************************************
							' gibt den metrischen wert zurück
							' InputParameter:
							' ID ... id des wertes in der tabelle
							'******************************************************************************
							'Function fc_get_metric_value(ID)
							dbl_measured_mm_mother = fc_get_metric_value(lng_fk_feet_mother)
							dbl_measured_mm_mother = (dbl_measured_mm_mother ) + (fc_get_metric_value(lng_fk_inch_mother))
							dbl_measured_mm_mother = (dbl_measured_mm_mother ) + (fc_get_metric_value(lng_fk_thirtysecond_inch_mother))
							'call showMessage("dbl_measured_mm_mother: " & dbl_measured_mm_mother)
						end if
						
						'20110602 falls die Mutter auf Defaultgröße gesetzt wurde
						If i_mother_default = 1 Then
							lng_fk_cm_mother = 0
							lng_fk_cm_deci_mother = 0
							lng_fk_feet_mother = 0
							lng_fk_inch_mother = 0
							lng_fk_eighths_inch_mother = 0
							lng_fk_sixteenth_inch_mother = 0
							lng_fk_thirtysecond_inch_mother = 0
							dbl_measured_mm_mother = Con_i_default_size_mother'der Defaultwert
						end if

						sqlCommand = "UPDATE tbl_0801_athlete_measured SET " & _
						"dt_measured = '" & fc_str_date_server_format(Now(), 4) & "'" & _
						", i_fk_measured_type = '" & 2 & "'" & _
						", i_measured_series = '" & 1 & "'" & _
						", i_fk_measured_system = '" & i_fk_measured_system_mother & "'" & _
						", lng_fk_cm = '" & lng_fk_cm_mother & "'" & _
						", lng_fk_cm_deci = '" & lng_fk_cm_deci_mother & "'" & _
						", lng_fk_feet = '" & lng_fk_feet_mother & "'" & _
						", lng_fk_inch = '" & lng_fk_inch_mother & "'" & _
						", lng_fk_eighths_inch = '" & lng_fk_eighths_inch_mother & "'" & _
						", lng_fk_sixteenth_inch = '" & lng_fk_sixteenth_inch_mother & "'" & _
						", lng_fk_thirtysecond_inch = '" & lng_fk_thirtysecond_inch_mother & "'" & _
						", lng_fk_kg = '" & 0 & "'" & _
						", lng_fk_kg_deci = '" & 0 & "'" & _
						", lng_fk_lbs = '" & 0 & "'" & _
						", i_fk_status = '" & 1 & "'" & _
						", lng_fk_User_ID_update = '" & iu & "'" & _
						", dt_update = '" & fc_str_date_server_format(Now(), 4) & "'" & _
						" WHERE lng_fk_User_ID = '"  & id_dyna & "'" & _
						" AND i_fk_measured_type = '" & 2 & "'"
						
						'der metrische wert wird abgespeicher
						'fc_check_value_replace(str_replace_string, i_default_len)
						dbl_measured_mm_mother = fc_check_value_replace_comma(dbl_measured_mm_mother, 1)
						sqlCommand_02 = "UPDATE tbl_0802_athlete_calculated SET " & _
						"dt_measured = '" & fc_str_date_server_format(Now(), 4) & "'" & _
						", dbl_measured_mm = '" & dbl_measured_mm_mother & "'" & _
						", dbl_measured_kg = '" & 0 & "'" & _
						", lng_fk_User_ID_update = '" & iu & "'" & _
						" WHERE lng_fk_User_ID = '"  & id_dyna & "'" & _
						" AND i_fk_measured_type = '" & 2 & "'"
						
						'Response.Write(sqlCommand & "<br>")
'						Response.Write("id_dyna: " & id_dyna & "<br>")
'						Response.Write("i_fk_measured_system_mother: " & i_fk_measured_system_mother & "<br>")
						
						'ohne Defaultgröße
						If id_dyna > 0 and i_fk_measured_system_mother > 0 and str_logfree = "A0" and i_mother_default = 0 Then
'							Response.Write(sqlCommand & "<br>")
'							Response.Write(sqlCommand_02 & "<br>")
'							Response.end()
							objConn.Execute sqlCommand
							objConn.Execute sqlCommand_02
						end if
						'mit Defaultgröße ... man muss dann kein messsystem auswählem
						If id_dyna > 0 and str_logfree = "A0" and i_mother_default = 1 Then
'							Response.Write(sqlCommand & "<br>")
'							Response.Write(sqlCommand_02 & "<br>")
'							Response.end()
							objConn.Execute sqlCommand
							objConn.Execute sqlCommand_02
						end if
						
						'Response.Write(sqlCommand & "<br>")

'größenerfassung father----------------------------------------------------------
						'i_fk_measured_type
						'1	Master father
						'2	Master father
						'3	Master Father
						'4	Calculate Athlete
						
						'i_measured_series
						'1 >> erste messreihe bzw. Stammdatenmessung
						'2 >> zweite messreihe
						'3 >> dritte messreihe
						
						'i_fk_measured_system_father
						'0	+++please select+++	
						'1	metric				
						'2	feet - inch -1/8	
						'3	feet - inch -1/16	
						'4	feet - inch -1/32	
						
						i_fk_measured_system_father = Request("LST_i_measured_sytem_father")
						
						If i_fk_measured_system_father = 1 Then'metric
							lng_fk_cm_father = Request("LST_cm_father")
							lng_fk_cm_deci_father = Request("LST_cm_deci_father")

							'******************************************************************************
							' gibt den metrischen wert zurück
							' InputParameter:
							' ID ... id des wertes in der tabelle
							'******************************************************************************
							'Function fc_get_metric_value(ID)
							dbl_measured_mm_father = fc_get_metric_value(lng_fk_cm_father)
							dbl_measured_mm_father = (dbl_measured_mm_father ) + (fc_get_metric_value(lng_fk_cm_deci_father))
							dbl_measured_mm_father = dbl_measured_mm_father * 10
								'call showMessage("dbl_measured_mm_father: " & dbl_measured_mm_father)
						end if
						
						If i_fk_measured_system_father = 2 Then'feet - inch -1/8	
							lng_fk_feet_father = Request("LST_feet_08_father")
							lng_fk_inch_father = Request("LST_inch_08_father")
							lng_fk_eighths_inch_father = Request("LST_eighths_inch_father")
							
							'******************************************************************************
							' gibt den metrischen wert zurück
							' InputParameter:
							' ID ... id des wertes in der tabelle
							'******************************************************************************
							'Function fc_get_metric_value(ID)
							dbl_measured_mm_father = fc_get_metric_value(lng_fk_feet_father)
							dbl_measured_mm_father = (dbl_measured_mm_father ) + (fc_get_metric_value(lng_fk_inch_father))
							dbl_measured_mm_father = (dbl_measured_mm_father ) + (fc_get_metric_value(lng_fk_eighths_inch_father))
								'call showMessage("dbl_measured_mm_father: " & dbl_measured_mm_father)
						end if

						If i_fk_measured_system_father = 3 Then'feet - inch -1/16	
							lng_fk_feet_father = Request("LST_feet_16_father")
							lng_fk_inch_father = Request("LST_inch_16_father")
							lng_fk_sixteenth_inch_father = Request("LST_sixteenth_father")

							'******************************************************************************
							' gibt den metrischen wert zurück
							' InputParameter:
							' ID ... id des wertes in der tabelle
							'******************************************************************************
							'Function fc_get_metric_value(ID)
							dbl_measured_mm_father = fc_get_metric_value(lng_fk_feet_father)
							dbl_measured_mm_father = (dbl_measured_mm_father ) + (fc_get_metric_value(lng_fk_inch_father))
							dbl_measured_mm_father = (dbl_measured_mm_father ) + (fc_get_metric_value(lng_fk_sixteenth_inch_father))
								'call showMessage("dbl_measured_mm_father: " & dbl_measured_mm_father)
						end if

						If i_fk_measured_system_father = 4 Then'feet - inch -1/32	
							lng_fk_feet_father = Request("LST_feet_32_father")
							lng_fk_inch_father = Request("LST_inch_32_father")
							lng_fk_thirtysecond_inch_father = Request("LST_thirtysecond_inch_father")

							'******************************************************************************
							' gibt den metrischen wert zurück
							' InputParameter:
							' ID ... id des wertes in der tabelle
							'******************************************************************************
							'Function fc_get_metric_value(ID)
							dbl_measured_mm_father = fc_get_metric_value(lng_fk_feet_father)
							dbl_measured_mm_father = (dbl_measured_mm_father ) + (fc_get_metric_value(lng_fk_inch_father))
							dbl_measured_mm_father = (dbl_measured_mm_father ) + (fc_get_metric_value(lng_fk_thirtysecond_inch_father))
							'call showMessage("dbl_measured_mm_father: " & dbl_measured_mm_father)
						end if

						'20110602 falls der vater auf Defaultgröße gesetzt wurde
						If i_father_default = 1 Then
							lng_fk_cm_father = 0
							lng_fk_cm_deci_father = 0
							lng_fk_feet_father = 0
							lng_fk_inch_father = 0
							lng_fk_eighths_inch_father = 0
							lng_fk_sixteenth_inch_father = 0
							lng_fk_thirtysecond_inch_father = 0
							dbl_measured_mm_father = Con_i_default_size_father'der Defaultwert 
						end if
						
						sqlCommand = "UPDATE tbl_0801_athlete_measured SET " & _
						"dt_measured = '" & fc_str_date_server_format(Now(), 4) & "'" & _
						", i_fk_measured_type = '" & 3 & "'" & _
						", i_measured_series = '" & 1 & "'" & _
						", i_fk_measured_system = '" & i_fk_measured_system_father & "'" & _
						", lng_fk_cm = '" & lng_fk_cm_father & "'" & _
						", lng_fk_cm_deci = '" & lng_fk_cm_deci_father & "'" & _
						", lng_fk_feet = '" & lng_fk_feet_father & "'" & _
						", lng_fk_inch = '" & lng_fk_inch_father & "'" & _
						", lng_fk_eighths_inch = '" & lng_fk_eighths_inch_father & "'" & _
						", lng_fk_sixteenth_inch = '" & lng_fk_sixteenth_inch_father & "'" & _
						", lng_fk_thirtysecond_inch = '" & lng_fk_thirtysecond_inch_father & "'" & _
						", lng_fk_kg = '" & 0 & "'" & _
						", lng_fk_kg_deci = '" & 0 & "'" & _
						", lng_fk_lbs = '" & 0 & "'" & _
						", i_fk_status = '" & 1 & "'" & _
						", lng_fk_User_ID_update = '" & iu & "'" & _
						", dt_update = '" & fc_str_date_server_format(Now(), 4) & "'" & _
						" WHERE lng_fk_User_ID = '"  & id_dyna & "'" & _
						" AND i_fk_measured_type = '" & 3 & "'"
	
						'der metrische wert wird abgespeicher
						'fc_check_value_replace(str_replace_string, i_default_len)
						dbl_measured_mm_father = fc_check_value_replace_comma(dbl_measured_mm_father, 1)
						sqlCommand_02 = "UPDATE tbl_0802_athlete_calculated SET " & _
						"dt_measured = '" & fc_str_date_server_format(Now(), 4) & "'" & _
						", dbl_measured_mm = '" & dbl_measured_mm_father & "'" & _
						", dbl_measured_kg = '" & 0 & "'" & _
						", lng_fk_User_ID_update = '" & iu & "'" & _
						" WHERE lng_fk_User_ID = '"  & id_dyna & "'" & _
						" AND i_fk_measured_type = '" & 3 & "'"
						
						'Response.Write(sqlCommand & "<br>")
						
						'ohne Defaultgröße
						If id_dyna > 0 and i_fk_measured_system_father > 0 and str_logfree = "A0" and i_father_default = 0 Then
							'Response.Write(sqlCommand & "<br>")
							'Response.Write(sqlCommand_02 & "<br>")
							'Response.end()
							objConn.Execute sqlCommand
							objConn.Execute sqlCommand_02
						end if
						'mit Defaultgröße muss man kein Messystem auswählen
						If id_dyna > 0 and str_logfree = "A0" and i_father_default = 1 Then
							'Response.Write(sqlCommand & "<br>")
							'Response.Write(sqlCommand_02 & "<br>")
							'Response.end()
							objConn.Execute sqlCommand
							objConn.Execute sqlCommand_02
						end if
						
						'Response.Write(sqlCommand & "<br>")
		
end if'If i_measured = 0 Then'noch keine messung alle daten können noch geändert werden
						
						'--------------------------------------------------------------------------------
							
						queryStr = "SELECT * FROM tbl_0501_user WHERE lng_k_User_ID = " & id_dyna
										
		Case "R"'speichert den neuen (nicht mehr leeren datensatz)
				
				If bol_objConn = True Then
				
					'liest die felder ein
					lng_k_id = Request("id_0501")
					str_User_id= Request("str_User_id")
					str_pw = Request("str_pw")
					str_pw_confirm = Request("str_pw_confirm")
					str_User_First_Name = Request("str_User_First_Name")
					str_User_Last_Name = Request("str_User_Last_Name")
					str_User_email = Request("str_User_email")
					str_User_email_02 = Request("str_User_email_02")
					lng_fk_country = Request("LST_Country")
					'1	dd.mm.yyyy
					'2	mm.dd.yyyy
					i_fk_date_format = Request("LST_date_format")
					dt_birthday = Request("dt_birthday")

					lng_fk_ethnic = Request("LST_ethnic")
					lng_fk_gender = Request("LST_Gender")

					lng_fk_sport_01 = Request("LST_sport_01")
					lng_fk_sport_02 = Request("LST_sport_02")
					lng_fk_sport_03 = Request("LST_sport_03")
					
					i_emails_no = Request("ckk_i_emails_no")
					If i_emails_no = "checkbox" Then
						i_emails_no = 1
					else
						i_emails_no = 2
					end if

					i_insert_error = 0'default
				
					If Cint(i_len_userid) >= Cint(i_len_ses_userid) and Cint(i_len_pw) >= Cint(i_len_ses_pw) Then
						'******************************************************************************
						' überprüft ob die zugangsdaten (userid und pw) eindeutig sind
						' InputParameter:
						' i_check ... 0 >> es wird nur überprüft ob die user id eindeutig ist / 1 >> user id und pw müssen zusammen eindeutig sein
						' str_User_id ... die eingegebene user id
						' str_pw ... das eingegebene passwort
						' lng_k_User_ID ... der aktuelle user
						' i_info ... ob es eine neuanlage ist (0) oder schon ein bestehender user ist (1)
						'******************************************************************************
						'ob userid und pw ok sind - A1 >> nein - A0 >> ok
						'Function fc_str_check_logindata(i_check, str_User_id, str_pw, lng_k_User_ID, i_info)
						str_logfree  = fc_str_check_logindata(0, str_User_id, str_pw, 0, 0)
						'Response.Write("str_logfree: " & str_logfree)
						'Response.end()
					else
						str_logfree = "A1"
					end if
									
					'Your login details are not correct! Please change your USER ID or PASSWORD!
					If str_logfree = "A1" Then
						i_insert_error = 16
						'call showMessage(Con_Msg_16 & " " & i_len_ses_userid & " " & Con_Msg_16b & " " & i_len_ses_pw & " " & Con_Msg_16c)
					end if
					
					'Passwort wird überprüft
					If str_pw <> str_pw_confirm Then
						str_logfree = "A1"
						i_insert_error = 16
						'call showMessage(Con_Msg_17)'That was <Password> entering your <PASSWORD CONFIRM> not properly confirmed!
					end if

					'wandelt ein einfaches Hochkomma um für den SQL-Statement um	
					str_User_id= fc_check_string_replace(str_User_id, 0)
					str_pw = fc_check_string_replace(str_pw, 0)
					str_pw_confirm = fc_check_string_replace(str_pw_confirm, 0)
					str_User_First_Name = fc_check_string_replace(str_User_First_Name, 0)
					str_User_Last_Name = fc_check_string_replace(str_User_Last_Name, 0)
					str_User_email = fc_check_string_replace(str_User_email, 0)
					str_User_email_02 = fc_check_string_replace(str_User_email_02, 0)
										
					lng_fk_user_group = 5 'immer bei einer Athlete eingabe
					lng_fk_organization = lng_fk_User_ID_org_ses'der fremdschlüssel von der tabelle <tbl_0201_organization>

					'Defaultgrößen
					i_mother_default = Request("ckk_i_mother_default")
					'wenn die checkbox aktiviert ist ....
					If i_mother_default = "checkbox" Then
						i_mother_default = 1
					else
						i_mother_default = 0	
					end if
					
					i_father_default = Request("ckk_i_father_default")
					'wenn die checkbox aktiviert ist ....
					If i_father_default = "checkbox" Then
						i_father_default = 1
					else
						i_father_default = 0	
					end if


'wandelt das datum um------------------------------------------------------------------------------------------------
'2009 05 23 Popup Datum (Form)
					If IsDate(dt_birthday) Then	
						dt_birthday = fc_str_date_Server_format(dt_birthday, 4)
					else
						dt_birthday = 0
					end if
''20081116 verschlüsselung-------------------------------------
'Dim crypter'dll aufruf (Achtung GROSS - KLEIN Schreibung wird berücksichtigt)
'Set crypter = server.CreateObject("AIT_BASE.cCrypter")	
'
'		'2008 11 16 bei einer neuanlage gibt es nurmehr ein standard pw
'		str_pw = "pdm"
'		str_pw = crypter.Encrypt(str_pw)
'		str_pw = Left(str_pw, 200)
''------------------------------------------------------------
			   
				If bol_objConn = True Then
					
					If Cint(lng_fk_user_group_ses) = 5 Then 'stammdaten für einen Athleten
					
					sql_new = "INSERT INTO tbl_0501_user " & _
					 "(" & _
							" str_User_id" & _
							", lng_fk_user_group" & _
						  	", str_pw" & _
						  	", str_User_First_Name" & _
						  	", str_User_Last_Name" & _
						  	", i_fk_date_format" & _
							", dt_birthday" & _
							", lng_fk_ethnic" & _
							", lng_fk_gender" & _
						  	", str_User_email" & _
						  	", str_User_email_02" & _
							", i_emails_no" & _
						  	", lng_fk_country" & _
							", i_fk_status" & _
							", lng_fk_sport_01 " & _
							", lng_fk_sport_02 " & _
							", lng_fk_sport_03 " & _
							", i_mother_default " & _
							", i_father_default " & _
					  ") VALUES ('" & str_User_id & "'" & _
					  		", '" & 5 & "'" & _
							", '" & str_pw & "'" & _
							", '" & str_User_First_Name & "'" & _
							", '" & str_User_Last_Name & "'" & _
							", '" & i_fk_date_format & "'" & _
							", '" & dt_birthday & "'" & _
							", '" & lng_fk_ethnic & "'" & _
							", '" & lng_fk_gender & "'" & _
							", '" & str_User_email & "'" & _
							", '" & str_User_email_02 & "'" & _
							", '" & i_emails_no & "'" & _
							", '" & lng_fk_country & "'" & _
							", '" & 1 & "'" & _
							", '" & lng_fk_sport_01 & "'" & _
							", '" & lng_fk_sport_02 & "'" & _
							", '" & lng_fk_sport_03 & "'" & _
							", '" & i_mother_default & "'" & _
							", '" & i_father_default & "'" & _
					 ")"

					 end if
'						Response.Write(sql_new)
'						Response.End()
					
					If str_logfree = "A0" Then

    					objConn.Execute sql_new	
										  
        				GetIDSQL = "SELECT max(lng_k_User_ID) AS nID FROM tbl_0501_user"
             			objRS.Open GetIDSQL, objConn, adOpenStatic, adLockOptimistic 
                 		'Speichern der ID in eine Variable
              			nID = objRS.Fields("nID")
						objRS.close
						set objRS = nothing
						
						If nID > 0 Then
							lng_k_id = nID
						end if
						id_dyna = lng_k_id
							
						'isx = 0 >> keine neue stammdateneingabe übers login
						'isx = 2 >> neue head org stammdateneingabe übers login
						'isx = 3 >> neue org stammdateneingabe übers login
						'isx = 4 >> neue trainer stammdateneingabe übers login
						'isx = 5 >> neue athlete stammdateneingabe übers login	
						Session("ses_i_isx") = 0'stammdateneingabe ist fertig deshalb > 0
						Session("ses_iu") = lng_k_id
						Session("ses_ig") = 5'athlete

						'******************************************************************************
						' setzt die master id auf eingelogt
						' InputParameter:
						' str_master_id ... die master id  des eingeloggten users str_master_id im erstmaligen anmelden
						' lng_k_id ... die neu angelegte user id
						' lng_fk_head_organization .... die head org id wird mit aktualisiert
						' lng_fk_organization ... die org id wird mit aktualisiert
						' i_type .... (i_type >> 1 Admin - 2 Org admin - 3 Coach - 4 Kind - 5 head org)
						' lng_fk_trainer ... die trainer id
						' lng_fk_athlete ... die athlete id
						'******************************************************************************
						'Sub master_id_passiv(str_master_id, lng_k_id, lng_fk_head_organization, lng_fk_organization, i_type, lng_fk_trainer, lng_fk_athlete)
						lng_fk_athlete = Session("ses_i_athlete")
						Call master_id_passiv(Session("ses_str_master_id"), id_dyna, 0, 0, 5, 0, lng_fk_athlete)
						
						id_dyna = lng_k_id
						
						'legt jetzt die infodaten (user - datum) zusätzlich an
						sqlCommand = "UPDATE tbl_0501_user SET " & _
						" lng_fk_User_ID_update = '" & id_dyna & "'" & _
						", dt_update = '" & fc_str_date_server_format(Now(), 4) & "'" & _
						", lng_fk_User_ID_create = '" & id_dyna & "'" & _
						", dt_create = '" & fc_str_date_server_format(Now(), 4) & "'" & _
						" WHERE lng_k_User_ID ="  & id_dyna 

						objConn.Execute sqlCommand
						
												
'größenerfassung athlete------------------------------------------
						'i_fk_measured_type
						'1	Master Athlete
						'2	Master Mother
						'3	Master Father
						'4	Calculate Athlete
						
						'i_measured_series
						'1 >> erste messreihe bzw. Stammdatenmessung
						'2 >> zweite messreihe
						'3 >> dritte messreihe
						
						'i_fk_measured_system_athlete
						'0	+++please select+++	
						'1	metric				
						'2	feet - inch -1/8	
						'3	feet - inch -1/16	
						'4	feet - inch -1/32	

						i_fk_measured_system_athlete = Request("LST_i_measured_sytem_athlete")
						
						If i_fk_measured_system_athlete = 1 Then'metric
							lng_fk_cm_athlete = Request("LST_cm_athlete")
							lng_fk_cm_deci_athlete = Request("LST_cm_deci_athlete")
							lng_kg_athlete = Request("LST_kg")
							'******************************************************************************
							' gibt den metrischen wert zurück
							' InputParameter:
							' ID ... id des wertes in der tabelle
							'******************************************************************************
							'Function fc_get_metric_value(ID)
							dbl_measured_mm_athlete = fc_get_metric_value(lng_fk_cm_athlete)
							dbl_measured_mm_athlete = (dbl_measured_mm_athlete ) + (fc_get_metric_value(lng_fk_cm_deci_athlete))
							dbl_measured_mm_athlete = dbl_measured_mm_athlete * 10
								'call showMessage("dbl_measured_mm_athlete: " & dbl_measured_mm_athlete)
							dbl_measured_kg = fc_get_metric_value(lng_kg_athlete)
								'call showMessage("dbl_measured_kg: " & dbl_measured_kg)
						end if
						
						If i_fk_measured_system_athlete = 2 Then'feet - inch -1/8	
							lng_fk_feet_athlete = Request("LST_feet_08_athlete")
							lng_fk_inch_athlete = Request("LST_inch_08_athlete")
							lng_fk_eighths_inch_athlete = Request("LST_eighths_inch_athlete")
							lng_fk_lbs = Request("LST_lbs")

							'******************************************************************************
							' gibt den metrischen wert zurück
							' InputParameter:
							' ID ... id des wertes in der tabelle
							'******************************************************************************
							'Function fc_get_metric_value(ID)
							dbl_measured_mm_athlete = fc_get_metric_value(lng_fk_feet_athlete)
							dbl_measured_mm_athlete = (dbl_measured_mm_athlete ) + (fc_get_metric_value(lng_fk_inch_athlete))
							dbl_measured_mm_athlete = (dbl_measured_mm_athlete ) + (fc_get_metric_value(lng_fk_eighths_inch_athlete))
								'call showMessage("dbl_measured_mm_athlete: " & dbl_measured_mm_athlete)
							dbl_measured_kg = fc_get_metric_value(lng_fk_lbs)
								'call showMessage("dbl_measured_kg: " & dbl_measured_kg)
						end if

						If i_fk_measured_system_athlete = 3 Then'feet - inch -1/16	
							lng_fk_feet_athlete = Request("LST_feet_16_athlete")
							lng_fk_inch_athlete = Request("LST_inch_16_athlete")
							lng_fk_sixteenth_inch_athlete = Request("LST_sixteenth_athlete")
							lng_fk_lbs = Request("LST_lbs")

							'******************************************************************************
							' gibt den metrischen wert zurück
							' InputParameter:
							' ID ... id des wertes in der tabelle
							'******************************************************************************
							'Function fc_get_metric_value(ID)
							dbl_measured_mm_athlete = fc_get_metric_value(lng_fk_feet_athlete)
							dbl_measured_mm_athlete = (dbl_measured_mm_athlete ) + (fc_get_metric_value(lng_fk_inch_athlete))
							dbl_measured_mm_athlete = (dbl_measured_mm_athlete ) + (fc_get_metric_value(lng_fk_sixteenth_inch_athlete))
								'call showMessage("dbl_measured_mm_athlete: " & dbl_measured_mm_athlete)
							dbl_measured_kg = fc_get_metric_value(lng_fk_lbs)
								'call showMessage("dbl_measured_kg: " & dbl_measured_kg)
						end if

						If i_fk_measured_system_athlete = 4 Then'feet - inch -1/32	
							lng_fk_feet_athlete = Request("LST_feet_32_athlete")
							lng_fk_inch_athlete = Request("LST_inch_32_athlete")
							lng_fk_thirtysecond_inch_athlete = Request("LST_thirtysecond_inch_athlete")
							lng_fk_lbs = Request("LST_lbs")

							'******************************************************************************
							' gibt den metrischen wert zurück
							' InputParameter:
							' ID ... id des wertes in der tabelle
							'******************************************************************************
							'Function fc_get_metric_value(ID)
							dbl_measured_mm_athlete = fc_get_metric_value(lng_fk_feet_athlete)
							dbl_measured_mm_athlete = (dbl_measured_mm_athlete ) + (fc_get_metric_value(lng_fk_inch_athlete))
							dbl_measured_mm_athlete = (dbl_measured_mm_athlete ) + (fc_get_metric_value(lng_fk_thirtysecond_inch_athlete))
								'call showMessage("dbl_measured_mm_athlete: " & dbl_measured_mm_athlete)
							dbl_measured_kg = fc_get_metric_value(lng_fk_lbs)
								'call showMessage("dbl_measured_kg: " & dbl_measured_kg)
						end if

						sql_new = "INSERT INTO tbl_0801_athlete_measured " & _
						 "(" & _
								" lng_fk_User_ID" & _
								", dt_measured" & _
								", i_fk_measured_type" & _
								", i_measured_series" & _
								", i_fk_measured_system" & _
								", lng_fk_cm" & _
								", lng_fk_cm_deci" & _
								", lng_fk_feet" & _
								", lng_fk_inch" & _
								", lng_fk_eighths_inch" & _
								", lng_fk_sixteenth_inch" & _
								", lng_fk_thirtysecond_inch" & _
								", lng_fk_kg" & _
								", lng_fk_kg_deci" & _
								", lng_fk_lbs" & _
								", i_fk_status" & _
								", dt_update" & _
						  ") VALUES ('" & id_dyna & "'" & _
								", '" & fc_str_date_server_format(Now(), 4) & "'" & _
								", '" & 1 & "'" & _
								", '" & 1 & "'" & _
								", '" & i_fk_measured_system_athlete & "'" & _
								", '" & lng_fk_cm_athlete & "'" & _
								", '" & lng_fk_cm_deci_athlete & "'" & _
								", '" & lng_fk_feet_athlete & "'" & _
								", '" & lng_fk_inch_athlete & "'" & _
								", '" & lng_fk_eighths_inch_athlete & "'" & _
								", '" & lng_fk_sixteenth_inch_athlete & "'" & _
								", '" & lng_fk_thirtysecond_inch_athlete & "'" & _
								", '" & lng_kg_athlete & "'" & _
								", '" & 0 & "'" & _
								", '" & lng_fk_lbs & "'" & _
								", '" & 1 & "'" & _
								", '" & fc_str_date_server_format(Now(), 4) & "'" & _
						 ")"

						'der metrische wert wird abgespeicher
						'fc_check_value_replace(str_replace_string, i_default_len)
						dbl_measured_mm_athlete = fc_check_value_replace_comma(dbl_measured_mm_athlete, 1)
						dbl_measured_kg = fc_check_value_replace_comma(dbl_measured_kg, 1)

						sql_new_02 = "INSERT INTO tbl_0802_athlete_calculated  " & _
						 "(" & _
								" lng_fk_User_ID" & _
								", dt_measured" & _
								", i_fk_measured_type" & _
								", dbl_measured_mm" & _
								", dbl_measured_kg" & _
						  ") VALUES ('" & id_dyna & "'" & _
								", '" & fc_str_date_server_format(Now(), 4) & "'" & _
								", '" & 1 & "'" & _
								", '" & dbl_measured_mm_athlete & "'" & _
								", '" & dbl_measured_kg & "'" & _
						 ")"

						 If i_fk_measured_system_athlete > 0 Then
							'Response.Write(sqlCommand & "<br>")
							'Response.Write(sql_new_02 & "<br>")
							'Response.end()
							objConn.Execute sql_new
							objConn.Execute sql_new_02
						end if

'größenerfassung mother------------------------------------------
						'i_fk_measured_type
						'1	Master mother
						'2	Master Mother
						'3	Master Father
						'4	Calculate athlte
						
						'i_measured_series
						'1 >> erste messreihe bzw. Stammdatenmessung
						'2 >> zweite messreihe
						'3 >> dritte messreihe
						
						'i_fk_measured_system_mother
						'0	+++please select+++	
						'1	metric				
						'2	feet - inch -1/8	
						'3	feet - inch -1/16	
						'4	feet - inch -1/32	

						i_fk_measured_system_mother = Request("LST_i_measured_sytem_mother")
						
						If i_fk_measured_system_mother = 1 Then'metric
							lng_fk_cm_mother = Request("LST_cm_mother")
							lng_fk_cm_deci_mother = Request("LST_cm_deci_mother")

							'******************************************************************************
							' gibt den metrischen wert zurück
							' InputParameter:
							' ID ... id des wertes in der tabelle
							'******************************************************************************
							'Function fc_get_metric_value(ID)
							dbl_measured_mm_mother = fc_get_metric_value(lng_fk_cm_mother)
							dbl_measured_mm_mother = (dbl_measured_mm_mother ) + (fc_get_metric_value(lng_fk_cm_deci_mother))
							dbl_measured_mm_mother = dbl_measured_mm_mother * 10
								'call showMessage("dbl_measured_mm_mother: " & dbl_measured_mm_mother)
						end if
						
						If i_fk_measured_system_mother = 2 Then'feet - inch -1/8	
							lng_fk_feet_mother = Request("LST_feet_08_mother")
							lng_fk_inch_mother = Request("LST_inch_08_mother")
							lng_fk_eighths_inch_mother = Request("LST_eighths_inch_mother")

							'******************************************************************************
							' gibt den metrischen wert zurück
							' InputParameter:
							' ID ... id des wertes in der tabelle
							'******************************************************************************
							'Function fc_get_metric_value(ID)
							dbl_measured_mm_mother = fc_get_metric_value(lng_fk_feet_mother)
							dbl_measured_mm_mother = (dbl_measured_mm_mother ) + (fc_get_metric_value(lng_fk_inch_mother))
							dbl_measured_mm_mother = (dbl_measured_mm_mother ) + (fc_get_metric_value(lng_fk_eighths_inch_mother))
								'call showMessage("dbl_measured_mm_mother: " & dbl_measured_mm_mother)
						end if

						If i_fk_measured_system_mother = 3 Then'feet - inch -1/16	
							lng_fk_feet_mother = Request("LST_feet_16_mother")
							lng_fk_inch_mother = Request("LST_inch_16_mother")
							lng_fk_sixteenth_inch_mother = Request("LST_sixteenth_mother")

							'******************************************************************************
							' gibt den metrischen wert zurück
							' InputParameter:
							' ID ... id des wertes in der tabelle
							'******************************************************************************
							'Function fc_get_metric_value(ID)
							dbl_measured_mm_mother = fc_get_metric_value(lng_fk_feet_mother)
							dbl_measured_mm_mother = (dbl_measured_mm_mother ) + (fc_get_metric_value(lng_fk_inch_mother))
							dbl_measured_mm_mother = (dbl_measured_mm_mother ) + (fc_get_metric_value(lng_fk_sixteenth_inch_mother))
								'call showMessage("dbl_measured_mm_mother: " & dbl_measured_mm_mother)
						end if

						If i_fk_measured_system_mother = 4 Then'feet - inch -1/32	
							lng_fk_feet_mother = Request("LST_feet_32_mother")
							lng_fk_inch_mother = Request("LST_inch_32_mother")
							lng_fk_thirtysecond_inch_mother = Request("LST_thirtysecond_inch_mother")

							'******************************************************************************
							' gibt den metrischen wert zurück
							' InputParameter:
							' ID ... id des wertes in der tabelle
							'******************************************************************************
							'Function fc_get_metric_value(ID)
							dbl_measured_mm_mother = fc_get_metric_value(lng_fk_feet_mother)
							dbl_measured_mm_mother = (dbl_measured_mm_mother ) + (fc_get_metric_value(lng_fk_inch_mother))
							dbl_measured_mm_mother = (dbl_measured_mm_mother ) + (fc_get_metric_value(lng_fk_thirtysecond_inch_mother))
							'call showMessage("dbl_measured_mm_mother: " & dbl_measured_mm_mother)
						end if

						'20110602 falls die Mutter auf Defaultgröße gesetzt wurde
						If i_mother_default = 1 Then
							lng_fk_cm_mother = 0
							lng_fk_cm_deci_mother = 0
							lng_fk_feet_mother = 0
							lng_fk_inch_mother = 0
							lng_fk_eighths_inch_mother = 0
							lng_fk_sixteenth_inch_mother = 0
							lng_fk_thirtysecond_inch_mother = 0
							dbl_measured_mm_mother = Con_i_default_size_mother'der Defaultwert 
						end if

						sql_new = "INSERT INTO tbl_0801_athlete_measured " & _
						 "(" & _
								" lng_fk_User_ID" & _
								", dt_measured" & _
								", i_fk_measured_type" & _
								", i_measured_series" & _
								", i_fk_measured_system" & _
								", lng_fk_cm" & _
								", lng_fk_cm_deci" & _
								", lng_fk_feet" & _
								", lng_fk_inch" & _
								", lng_fk_eighths_inch" & _
								", lng_fk_sixteenth_inch" & _
								", lng_fk_thirtysecond_inch" & _
								", lng_fk_kg" & _
								", lng_fk_kg_deci" & _
								", lng_fk_lbs" & _
								", i_fk_status" & _
								", dt_update" & _
						  ") VALUES ('" & id_dyna & "'" & _
								", '" & fc_str_date_server_format(Now(), 4) & "'" & _
								", '" & 2 & "'" & _
								", '" & 1 & "'" & _
								", '" & i_fk_measured_system_mother & "'" & _
								", '" & lng_fk_cm_mother & "'" & _
								", '" & lng_fk_cm_deci_mother & "'" & _
								", '" & lng_fk_feet_mother & "'" & _
								", '" & lng_fk_inch_mother & "'" & _
								", '" & lng_fk_eighths_inch_mother & "'" & _
								", '" & lng_fk_sixteenth_inch_mother & "'" & _
								", '" & lng_fk_thirtysecond_inch_mother & "'" & _
								", '" & 0 & "'" & _
								", '" & 0 & "'" & _
								", '" & 0 & "'" & _
								", '" & 1 & "'" & _
								", '" & fc_str_date_server_format(Now(), 4) & "'" & _
						 ")"

						'der metrische wert wird abgespeicher
						'fc_check_value_replace(str_replace_string, i_default_len)
						dbl_measured_mm_mother = fc_check_value_replace_comma(dbl_measured_mm_mother, 1)

						sql_new_02 = "INSERT INTO tbl_0802_athlete_calculated  " & _
						 "(" & _
								" lng_fk_User_ID" & _
								", dt_measured" & _
								", i_fk_measured_type" & _
								", dbl_measured_mm" & _
								", dbl_measured_kg" & _
						  ") VALUES ('" & id_dyna & "'" & _
								", '" & fc_str_date_server_format(Now(), 4) & "'" & _
								", '" & 2 & "'" & _
								", '" & dbl_measured_mm_mother & "'" & _
								", '" & 0 & "'" & _
						 ")"
						 
						 'ohne Defaultgröße der Mutter
						 If i_fk_measured_system_mother > 0 and i_mother_default = 0 Then
							'Response.Write(sqlCommand & "<br>")
							'Response.Write(sql_new_02 & "<br>")
							'Response.end()
							objConn.Execute sql_new
							objConn.Execute sql_new_02
						end if
						'mit Defaultgröße der Mutter
						If i_mother_default = 1 Then
							'Response.Write(sqlCommand & "<br>")
							'Response.Write(sql_new_02 & "<br>")
							'Response.end()
							objConn.Execute sql_new
							objConn.Execute sql_new_02
						end if

'größenerfassung father------------------------------------------
						'i_fk_measured_type
						'1	Master father
						'2	Master father
						'3	Master Father
						'4	Calculate athlte
						
						'i_measured_series
						'1 >> erste messreihe bzw. Stammdatenmessung
						'2 >> zweite messreihe
						'3 >> dritte messreihe
						
						'i_fk_measured_system_father
						'0	+++please select+++	
						'1	metric				
						'2	feet - inch -1/8	
						'3	feet - inch -1/16	
						'4	feet - inch -1/32	

						i_fk_measured_system_father = Request("LST_i_measured_sytem_father")
						
						If i_fk_measured_system_father = 1 Then'metric
							lng_fk_cm_father = Request("LST_cm_father")
							lng_fk_cm_deci_father = Request("LST_cm_deci_father")

							'******************************************************************************
							' gibt den metrischen wert zurück
							' InputParameter:
							' ID ... id des wertes in der tabelle
							'******************************************************************************
							'Function fc_get_metric_value(ID)
							dbl_measured_mm_father = fc_get_metric_value(lng_fk_cm_father)
							dbl_measured_mm_father = (dbl_measured_mm_father ) + (fc_get_metric_value(lng_fk_cm_deci_father))
							dbl_measured_mm_father = dbl_measured_mm_father * 10
								'call showMessage("dbl_measured_mm_father: " & dbl_measured_mm_father)
						end if
						
						If i_fk_measured_system_father = 2 Then'feet - inch -1/8	
							lng_fk_feet_father = Request("LST_feet_08_father")
							lng_fk_inch_father = Request("LST_inch_08_father")
							lng_fk_eighths_inch_father = Request("LST_eighths_inch_father")
							
							'******************************************************************************
							' gibt den metrischen wert zurück
							' InputParameter:
							' ID ... id des wertes in der tabelle
							'******************************************************************************
							'Function fc_get_metric_value(ID)
							dbl_measured_mm_father = fc_get_metric_value(lng_fk_feet_father)
							dbl_measured_mm_father = (dbl_measured_mm_father ) + (fc_get_metric_value(lng_fk_inch_father))
							dbl_measured_mm_father = (dbl_measured_mm_father ) + (fc_get_metric_value(lng_fk_eighths_inch_father))
								'call showMessage("dbl_measured_mm_father: " & dbl_measured_mm_father)
						end if

						If i_fk_measured_system_father = 3 Then'feet - inch -1/16	
							lng_fk_feet_father = Request("LST_feet_16_father")
							lng_fk_inch_father = Request("LST_inch_16_father")
							lng_fk_sixteenth_inch_father = Request("LST_sixteenth_father")

							'******************************************************************************
							' gibt den metrischen wert zurück
							' InputParameter:
							' ID ... id des wertes in der tabelle
							'******************************************************************************
							'Function fc_get_metric_value(ID)
							dbl_measured_mm_father = fc_get_metric_value(lng_fk_feet_father)
							dbl_measured_mm_father = (dbl_measured_mm_father ) + (fc_get_metric_value(lng_fk_inch_father))
							dbl_measured_mm_father = (dbl_measured_mm_father ) + (fc_get_metric_value(lng_fk_sixteenth_inch_father))
								'call showMessage("dbl_measured_mm_father: " & dbl_measured_mm_father)
						end if

						If i_fk_measured_system_father = 4 Then'feet - inch -1/32	
							lng_fk_feet_father = Request("LST_feet_32_father")
							lng_fk_inch_father = Request("LST_inch_32_father")
							lng_fk_thirtysecond_inch_father = Request("LST_thirtysecond_inch_father")

							'******************************************************************************
							' gibt den metrischen wert zurück
							' InputParameter:
							' ID ... id des wertes in der tabelle
							'******************************************************************************
							'Function fc_get_metric_value(ID)
							dbl_measured_mm_father = fc_get_metric_value(lng_fk_feet_father)
							dbl_measured_mm_father = (dbl_measured_mm_father ) + (fc_get_metric_value(lng_fk_inch_father))
							dbl_measured_mm_father = (dbl_measured_mm_father ) + (fc_get_metric_value(lng_fk_thirtysecond_inch_father))
							'call showMessage("dbl_measured_mm_father: " & dbl_measured_mm_father)
						end if

						'20110602 falls der vater auf Defaultgröße gesetzt wurde
						If i_father_default = 1 Then
							lng_fk_cm_father = 0
							lng_fk_cm_deci_father = 0
							lng_fk_feet_father = 0
							lng_fk_inch_father = 0
							lng_fk_eighths_inch_father = 0
							lng_fk_sixteenth_inch_father = 0
							lng_fk_thirtysecond_inch_father = 0
							dbl_measured_mm_father = Con_i_default_size_father'der Defaultwert 
						end if

						sql_new = "INSERT INTO tbl_0801_athlete_measured " & _
						 "(" & _
								" lng_fk_User_ID" & _
								", dt_measured" & _
								", i_fk_measured_type" & _
								", i_measured_series" & _
								", i_fk_measured_system" & _
								", lng_fk_cm" & _
								", lng_fk_cm_deci" & _
								", lng_fk_feet" & _
								", lng_fk_inch" & _
								", lng_fk_eighths_inch" & _
								", lng_fk_sixteenth_inch" & _
								", lng_fk_thirtysecond_inch" & _
								", lng_fk_kg" & _
								", lng_fk_kg_deci" & _
								", lng_fk_lbs" & _
								", i_fk_status" & _
								", dt_update" & _
						  ") VALUES ('" & id_dyna & "'" & _
								", '" & fc_str_date_server_format(Now(), 4) & "'" & _
								", '" & 3 & "'" & _
								", '" & 1 & "'" & _
								", '" & i_fk_measured_system_father & "'" & _
								", '" & lng_fk_cm_father & "'" & _
								", '" & lng_fk_cm_deci_father & "'" & _
								", '" & lng_fk_feet_father & "'" & _
								", '" & lng_fk_inch_father & "'" & _
								", '" & lng_fk_eighths_inch_father & "'" & _
								", '" & lng_fk_sixteenth_inch_father & "'" & _
								", '" & lng_fk_thirtysecond_inch_father & "'" & _
								", '" & 0 & "'" & _
								", '" & 0 & "'" & _
								", '" & 0 & "'" & _
								", '" & 1 & "'" & _
								", '" & fc_str_date_server_format(Now(), 4) & "'" & _
						 ")"

						'der metrische wert wird abgespeicher
						'fc_check_value_replace(str_replace_string, i_default_len)
						dbl_measured_mm_father = fc_check_value_replace_comma(dbl_measured_mm_father, 1)

						sql_new_02 = "INSERT INTO tbl_0802_athlete_calculated  " & _
						 "(" & _
								" lng_fk_User_ID" & _
								", dt_measured" & _
								", i_fk_measured_type" & _
								", dbl_measured_mm" & _
								", dbl_measured_kg" & _
						  ") VALUES ('" & id_dyna & "'" & _
								", '" & fc_str_date_server_format(Now(), 4) & "'" & _
								", '" & 3 & "'" & _
								", '" & dbl_measured_mm_father & "'" & _
								", '" & 0 & "'" & _
						 ")"
						 
						 'ohne Defaultgröße des Vaters
						 If i_fk_measured_system_father > 0 and i_father_default = 0 Then
							'Response.Write(sqlCommand & "<br>")
							'Response.Write(sql_new_02 & "<br>")
							'Response.end()
							objConn.Execute sql_new
							objConn.Execute sql_new_02
						end if
						
						 'mit Defaultgröße des Vaters
						 If i_father_default = 1 Then
							'Response.Write(sqlCommand & "<br>")
							'Response.Write(sql_new_02 & "<br>")
							'Response.end()
							objConn.Execute sql_new
							objConn.Execute sql_new_02
						end if
						

'----------------------------------------------------------------------------------------------------------------------------------------------------------------
'sendet das aktivierungsmail 
'überprüft ob es diesen link schon einmal gibt
'Kopfgesteuerte Do-While-Schleife
	Do While not Cint(i_pw_loop) > Session("ses_i_pw_loop")
	  'generiert jetzt einen eindeutigen emaillink
	  str_emaillink = fc_emaillink_id(Session("ses_Password_log"), Session("ses_Username_log"))
	  i_str_emaillink = fc_i_count_emaillink_id(str_emaillink)'überprüft ob dieser emaillink schon einmal verwendet wurde
	  i_pw_loop = i_pw_loop + 1
	  'Response.Write(i_pw & "<br>")
	  If Cint(i_str_emaillink) = 0 or Cint(i_pw_loop) = Session("ses_i_pw_loop") Then
		Exit Do
	  End if
	Loop

	'der link zum aktivieren wird eingetragen
	sqlStr = "UPDATE tbl_0101_master_id SET " & _
	"str_emaillink = '" & str_emaillink & "' " & _
	", i_link_activate = '" & 0 & "' " & _
	"WHERE str_master_id ='"  & Session("ses_Password_log") & "' AND str_log_id ='" & Session("ses_Username_log") & "'"

	'Response.Write(sqlStr)
	'response.End()
	objConn.Execute sqlStr

'i_type
'2 - Head Org	
'3 - Org		
'4 - Trainer		
'5 - Athlete

'falls der owner ausgebelndet wurde
'1 >> Dummy
'0 >> no dummy

'für das email					 
Session("ses_mail_to") = str_User_email
Session("ses_mail_to_02")=""
Session("ses_i_email_template") = 8
Session("ses_str_User_id") = str_User_id
Session("ses_str_pw") = str_pw
Session("ses_str_User_name") = str_User_First_Name & " " & str_User_Last_Name
Session("ses_str_org") = str_division
Session("ses_str_trainer") = str_trainer_name

If Session("ses_i_dummy_head_org")= 1 Then
	Session("ses_str_org") = str_trainer_name
else
	Session("ses_str_org") = str_division
end if

'str_to ... wer soll das mail bekommen
'str_emaillink ... der eindeutige link zum aktivieren des acounts
'i_mailtemplate ... welche mailvorlage (text) soll vernwendet werden
'str_loginname ... der name des logins für die anmeldung
'str_pw ... das eingetragene pw des users
'str_headorg ... name der head org
'str_division ... name de rdivision
'str_username ... der Name (Vorname und Nachname)
'sys_userid ... beim erzeugen eines Zugangs wird eine userid erzeugt zb. E0-SXMWSBMXDP (zb. wenn eine org einen Coach anlegt)
'sys_pw ... beim erzeugen eines Zugangs wird eine userid erzeugt zb. s4jWTW546JeW (zb. wenn eine org einen Coach anlegt)
'i_str_text_tmp ... ob es einen zusätzlichen text gibt (0>nein - 1>ja)
'str_text_tmp ... ein Text der vom User zusätzlich eingegeben wurde
'i_cc_mail ... ob das mail auch cc an jemanden gesendet werden soll - 0=nein - 1=ja
'i_mail_to_02 ... ob das email auch an an einen zweite adrresse gesendet wird  - 0=nein - 1=ja
'str_to_02 ... wer soll das mail bekommen wenn <i_mail_to_02> =1

'Call sendmail(Session("ses_mail_to"), str_emaillink, 8, Session("ses_str_User_id"), Session("ses_str_pw"), 0, Session("ses_str_org"), 0, Session("ses_str_User_name"), Session("ses_str_User_id"), Session("ses_str_pw"), 0, 0, 0)

'mail ohne aktivierungslink
Session("ses_i_email_template") = 8
'Call sendmail(str_User_email, str_emaillink, 8, Session("ses_str_User_id"), Session("ses_str_pw"), str_head_organization, str_division, str_trainer_name, Session("ses_str_User_name"), Session("ses_str_User_id"), Session("ses_str_pw"), 0, 0, 0, 0, 0)

Call sendmail(Session("ses_mail_to"), 8, 0, 0, 0, 0, 0)
	
Response.Write ("<SCRIPT LANGUAGE='Javascript'>this.location.href='registration_04.asp';</SCRIPT>")
					
					else
						trancd = "N"	
					end if'If str_logfree = "A0" Then
			
					else
						trancd = "N"
				end if 	
	    	end if	
					queryStr = "SELECT * FROM tbl_0501_user WHERE lng_k_User_ID = " & id_dyna
'					Response.End()

     End Select
'******************************************************************************
Dim str_name_voll_benutzerkonto
str_name_voll_benutzerkonto = Session("ses_str_User_name")'Session("ses_str_trainer")
'******************************************************************************

If trancd <> "N" and i_insert_error = 0 Then
'				Response.Write("---------------------------------------------" & "<br>")
'				Response.Write("id_dyna: " & id_dyna & "<br>")
'				Response.Write(queryStr & "<br>")
'				response.End()
'				
				rst.Open queryStr, objConn, adOpenStatic, adLockOptimistic 
			
				If Not rst.BOF or Not rst.EOF Then 
						'liest die werte aus der db und trägt die werte in bestandsfelder ein 
						lng_k_id = rst.Fields("lng_k_User_ID").Value
						id_dyna = lng_k_id

				        str_User_id = rst.Fields("str_User_id").Value
				        str_pw = rst.Fields("str_pw").Value 
						str_pw_confirm = str_pw
				        str_User_First_Name = rst.Fields("str_User_First_Name").Value
				        str_User_Last_Name = rst.Fields("str_User_Last_Name").Value 
							Session("ses_str_User_name")= str_User_First_Name & " " & str_User_Last_Name 
				        
						i_fk_date_format = rst.Fields("i_fk_date_format").Value
						If IsNull(i_fk_date_format) or IsEmpty(i_fk_date_format) Then
							i_fk_date_format = 1 'default
						end if
						dt_birthday = rst.Fields("dt_birthday").Value
						If IsNull(dt_birthday) or IsEmpty(dt_birthday) Then
							dt_birthday = Now()
						end if

						If dt_birthday > 0 Then
							dt_birthday = fc_str_date_server_format(dt_birthday, 2)
						end if
												
						i_day = Day(dt_birthday)
							'Response.Write("i_day: " & i_day & "<br>")
						i_month	= Month(dt_birthday)
							'Response.Write("i_month: " & i_month & "<br>")
						i_year = Year(dt_birthday)
							'Response.Write("i_year: " & i_year & "<br>")
							
						i_emails_no = rst.Fields("i_emails_no").Value	
						
						lng_fk_ethnic = rst.Fields("lng_fk_ethnic").Value
						If IsNull(lng_fk_ethnic) or IsEmpty(lng_fk_ethnic) Then
							lng_fk_ethnic = 0
						end if
						lng_fk_gender = rst.Fields("lng_fk_gender").Value
						If IsNull(lng_fk_gender) or IsEmpty(lng_fk_gender) Then
							lng_fk_gender = 0
						end if
				        lng_fk_country = rst.Fields("lng_fk_country").Value
						If IsNull(lng_fk_country) or IsEmpty(lng_fk_country) Then
							lng_fk_country = 0
						end if
						
				        str_User_email = rst.Fields("str_User_email").Value
							Session("ses_user_email") = str_User_email
						str_User_email_confirm = str_User_email
						str_User_email_02 = rst.Fields("str_User_email_02").Value
				        i_fk_status = rst.Fields("i_fk_status").Value
						
						lng_fk_sport_01 = rst.Fields("lng_fk_sport_01").Value
						lng_fk_sport_02 = rst.Fields("lng_fk_sport_02").Value
						lng_fk_sport_03 = rst.Fields("lng_fk_sport_03").Value
						
						lng_fk_User_ID_create = rst.Fields("lng_fk_User_ID_create").Value
						str_User_ID_create = fc_get_userid(lng_fk_User_ID_create)
						dt_create = rst.Fields("dt_create").Value
						
						'1	dd.mm.yyyy
						'2	mm.dd.yyyy
						If i_fk_date_format = 1 Then
							dt_create = fc_str_date_server_format(dt_create, 5)
						end if
						If i_fk_date_format = 2 Then
							dt_create = fc_str_date_server_format(dt_create, 6)
						end if
						str_createinfo = dt_create
						
						lng_fk_User_ID_update = rst.Fields("lng_fk_User_ID_update").Value
						str_User_ID_update = fc_get_userid(lng_fk_User_ID_update)
						dt_update = rst.Fields("dt_update").Value
						
						'1	dd.mm.yyyy
						'2	mm.dd.yyyy
						If i_fk_date_format = 1 Then
							dt_update = fc_str_date_server_format(dt_update, 5)
						end if
						If i_fk_date_format = 2 Then
							dt_update = fc_str_date_server_format(dt_update, 6)
						end if
						str_updateinfo = dt_update
						
						i_mother_default = rst.Fields("i_mother_default").Value
						i_father_default = rst.Fields("i_father_default").Value
						
'größenerfassung athlete ----------------------------------------------
SQL = "SELECT * FROM tbl_0801_athlete_measured WHERE lng_fk_User_ID = '" & id_dyna & "' AND i_fk_measured_type = '" & 1 & "'"
Set rst_tmp = Server.CreateObject("ADODB.Recordset")
rst_tmp.Open SQL, objConn, adOpenStatic, adLockReadOnly   
						
    If Not rst_tmp.EOF Then
            i_fk_measured_system_athlete = rst_tmp.Fields("i_fk_measured_system").Value
			lng_fk_cm_athlete = rst_tmp.Fields("lng_fk_cm").Value
			lng_fk_cm_deci_athlete = rst_tmp.Fields("lng_fk_cm_deci").Value
			lng_kg_athlete = rst_tmp.Fields("lng_fk_kg").Value
			
			lng_fk_feet_athlete = rst_tmp.Fields("lng_fk_feet").Value
			lng_fk_inch_athlete = rst_tmp.Fields("lng_fk_inch").Value
			lng_fk_eighths_inch_athlete = rst_tmp.Fields("lng_fk_eighths_inch").Value
			lng_fk_sixteenth_inch_athlete = rst_tmp.Fields("lng_fk_sixteenth_inch").Value
			lng_fk_thirtysecond_inch_athlete = rst_tmp.Fields("lng_fk_thirtysecond_inch").Value
			lng_fk_lbs = rst_tmp.Fields("lng_fk_lbs").Value
    End if
	rst_tmp.Close
set rst_tmp = Nothing

SQL = "SELECT dbl_measured_mm, dbl_measured_kg FROM tbl_0802_athlete_calculated WHERE lng_fk_User_ID = '" & id_dyna & "' AND i_fk_measured_type = '" & 1 & "'"
Set rst_tmp = Server.CreateObject("ADODB.Recordset")
rst_tmp.Open SQL, objConn, adOpenStatic, adLockReadOnly   
						
    If Not rst_tmp.EOF Then
        dbl_measured_mm_value_athlete = rst_tmp.Fields("dbl_measured_mm").Value
		dbl_measured_kg_value_athlete = rst_tmp.Fields("dbl_measured_kg").Value
    End if
	rst_tmp.Close
set rst_tmp = Nothing


'größenerfassung mother ----------------------------------------------
SQL = "SELECT * FROM tbl_0801_athlete_measured WHERE lng_fk_User_ID = '" & id_dyna & "' AND i_fk_measured_type = '" & 2 & "'"
Set rst_tmp = Server.CreateObject("ADODB.Recordset")
rst_tmp.Open SQL, objConn, adOpenStatic, adLockReadOnly   
						
    If Not rst_tmp.EOF Then
	
            i_fk_measured_system_mother = rst_tmp.Fields("i_fk_measured_system").Value
			lng_fk_cm_mother = rst_tmp.Fields("lng_fk_cm").Value
			lng_fk_cm_deci_mother = rst_tmp.Fields("lng_fk_cm_deci").Value
			
			lng_fk_feet_mother = rst_tmp.Fields("lng_fk_feet").Value
			lng_fk_inch_mother = rst_tmp.Fields("lng_fk_inch").Value
			lng_fk_eighths_inch_mother = rst_tmp.Fields("lng_fk_eighths_inch").Value
			lng_fk_sixteenth_inch_mother = rst_tmp.Fields("lng_fk_sixteenth_inch").Value
			lng_fk_thirtysecond_inch_mother = rst_tmp.Fields("lng_fk_thirtysecond_inch").Value

    End if
	rst_tmp.Close
set rst_tmp = Nothing

SQL = "SELECT dbl_measured_mm FROM tbl_0802_athlete_calculated WHERE lng_fk_User_ID = '" & id_dyna & "' AND i_fk_measured_type = '" & 2 & "'"
Set rst_tmp = Server.CreateObject("ADODB.Recordset")
rst_tmp.Open SQL, objConn, adOpenStatic, adLockReadOnly   
						
    If Not rst_tmp.EOF Then
        dbl_measured_mm_value_mother = rst_tmp.Fields("dbl_measured_mm").Value
    End if
	rst_tmp.Close
set rst_tmp = Nothing


'größenerfassung father ----------------------------------------------
SQL = "SELECT * FROM tbl_0801_athlete_measured WHERE lng_fk_User_ID = '" & id_dyna & "' AND i_fk_measured_type = '" & 3 & "'"
Set rst_tmp = Server.CreateObject("ADODB.Recordset")
rst_tmp.Open SQL, objConn, adOpenStatic, adLockReadOnly   
						
    If Not rst_tmp.EOF Then
	
            i_fk_measured_system_father = rst_tmp.Fields("i_fk_measured_system").Value
			lng_fk_cm_father = rst_tmp.Fields("lng_fk_cm").Value
			lng_fk_cm_deci_father = rst_tmp.Fields("lng_fk_cm_deci").Value
			
			lng_fk_feet_father = rst_tmp.Fields("lng_fk_feet").Value
			lng_fk_inch_father = rst_tmp.Fields("lng_fk_inch").Value
			lng_fk_eighths_inch_father = rst_tmp.Fields("lng_fk_eighths_inch").Value
			lng_fk_sixteenth_inch_father = rst_tmp.Fields("lng_fk_sixteenth_inch").Value
			lng_fk_thirtysecond_inch_father = rst_tmp.Fields("lng_fk_thirtysecond_inch").Value

    End if
	rst_tmp.Close
set rst_tmp = Nothing

SQL = "SELECT dbl_measured_mm FROM tbl_0802_athlete_calculated WHERE lng_fk_User_ID = '" & id_dyna & "' AND i_fk_measured_type = '" & 3 & "'"
Set rst_tmp = Server.CreateObject("ADODB.Recordset")
rst_tmp.Open SQL, objConn, adOpenStatic, adLockReadOnly   
						
    If Not rst_tmp.EOF Then
        dbl_measured_mm_value_father = rst_tmp.Fields("dbl_measured_mm").Value
    End if
	rst_tmp.Close
set rst_tmp = Nothing

'größenerfassung ende-------------------------------------------------
				else 
				     call showMessage(str_Msg_04)'Con_Msg_04
				end if 

        rst.Close 
	set rst = Nothing 
end if
'--------------------------------------------------------------------

If str_logfree = "A1" Then
	str_color_default = str_color_01'rot
else
	str_color_default = str_color_02'grün
end if

%>
<td width="900" align="left" class="navi">
	<table border="0" cellpadding="0" cellspacing="0" width="900">
		<td>
			<%
				'include menu object
				CALL userMenuWriteMenuObj("userMenu")
				CALL userMenuWriteInitScript("userMenu", objConn, getGroupByUser(objConn, Session("ses_iu")), Session("ses_i_language"))
			%>    		
		</td>
		<td align="right">
			<div style="padding-right: 5px; ">
			<% CALL userMenuInsertPagePath(objConn, getGroupByUser(objConn, Session("ses_iu")), Session("ses_i_language"), "athlete_user_admin_detail.asp") %>
		    </div>
		</td>
	</table>  
</td>
        <!-- InstanceEndEditable -->
<td width="25">&nbsp;</td>
</tr>
<tr>
<td width="25">&nbsp;</td><!-- InstanceBeginEditable name="Edit_Content" -->
<td width="900" height="450" align="left" valign="top" class="contentadminDE"><table width="900" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="200" height="90">&nbsp;</td>
<td width="675" height="90">&nbsp;</td>
<td width="25" height="90">&nbsp;</td>
</tr>
<tr>
<td width="200" height="360" align="left" valign="top"><p class="txtbasesm"><br />
<br />
<%= fc_value_string(Session("ses_i_language"), "var_u_adm_d_75") %>
<br />
<br />
<%= fc_value_string(Session("ses_i_language"), "var_u_adm_d_76") %>
</strong><br />
<br />
</p>
</td>
<td width="675" height="360" align="left" valign="top"><table width="675" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="200">&nbsp;</td>
<td width="475" valign="top">
<form method="Post" action="athlete_user_admin_detail_.asp?AP=<%=AP%>" name="frm_value" onSubmit="return Form_inputcheck(this)">
<table width="650" border="0" cellspacing="4" cellpadding="0">

<tr>
  <td width="50" height="50" align="center" valign="bottom" class="txttable"><img src="images/ico/athlete48.png" width="48" height="48" vspace="2" border="0" /></td>
<td width="489" height="50" valign="bottom" class="txttable">
 
<table width="100%" border="0">
<tr>
<td><div align="center"><strong><span class="txttable_red"><%=fc_value_string(Session("ses_i_language"), "var_glob_txt_1030")%></span></strong></div></td>
</tr>
<% If 1 > 2 Then'derzeit nicht aktiv bzw. erwünscht %>
<tr>
<td><div align="center"><strong><span class="txttable_red"><%=str_name_voll_benutzerkonto%></span></strong></div></td>
</tr>
<% end if %>
</table>
  
  </td> 
  <td width="29" height="50" align="center" valign="bottom" class="txttable"><% If trancd <> "N" Then %>
  <a href="javascript:go_back(1)"><img src="images/ico/athlete_previous24.png" alt="<%= var_hints_08 %>" title="<%= var_hints_08 %>"  width="24" height="24" vspace="2" border="0" /></a>
  <% end if %></td>
  <td width="29" height="50" align="center" valign="bottom" class="txttable"><img src="images/ico/athlete_add24_nac.png" alt="<%= var_hints_66 %>" title="<%= var_hints_66 %>" width="24" height="24" vspace="2" border="0" /></td>
  <td height="50" colspan="3" align="center" valign="bottom" class="txttable">
  <% If trancd <> "N" Then %>
  <input name="btnSubsave" type="image" title="<%= var_hints_47 %>" value="Save Profile" src="images/ico/athlete_ok24.png" alt="<%= var_hints_47 %>" width="24" height="24" vspace="2" border="0" onClick="javascript: check_save(1)"/>
  <% end if %>
  <% If trancd = "N" Then %>
  <input name="btnSubsave" type="image" title="<%= var_hints_47 %>" value="Save Profile" src="images/ico/athlete_ok24.png" alt="<%= var_hints_47 %>" width="24" height="24" vspace="2" border="0" onClick="javascript: check_save(3)"/>
  <% end if %></td>
</tr>

<tr>
  <td width="50" align="center" valign="bottom">&nbsp;</td>
  <td valign="top">
  <table width="489" border="0" cellspacing="0" cellpadding="0">
  <tr>
  <td width="489">&nbsp;</td>
  <td width="270" colspan="3"><div align="right"><span class="Stil4 Stil6"><%= fc_value_string(Session("ses_i_language"), "var_u_adm_d_50") %></span></div></td>
  </tr>
  <tr>
  <td width="489">
  <input type="hidden" name="id_0501" id="id_0501" size="6" value="<%=id_dyna%>" />
  <input name="i_info" type="hidden" id="i_info" value="<%= i_info %>" size="6" maxlength="6" />
  <input name="dt_birthday" type="hidden" class="field" id="dt_birthday" size="12" maxlength="10" />
  <input name="btnSub" type="hidden" id="btnSub" value="<%=trancd%>" size="6" maxlength="6" />
  <input name="i_measured" type="hidden" id="i_measured" value="<%=i_measured%>" size="6" maxlength="6" />
  <input name="i_insert_error" type="hidden" id="i_insert_error" value="<%=i_insert_error%>" size="6" maxlength="6" /></td>
  <td width="270" colspan="3"><span class="txttable">
  </span></td>
  </tr>
    
  <tr>
  <td width="489" height="50" colspan="4" valign="bottom" class="txttable"><strong><img src="images/ico/athlete_list32.png" width="32" height="32" hspace="5" border="0" /><br />
    <%=fc_value_string(Session("ses_i_language"), "var_u_adm_d_57")%></strong><img src="images/ico/help16.png" alt="" width="16" height="16" hspace="10" class="help" onMouseOver="Tip('<%= hint_117 %>', TITLE, '<div class=\'TitleCls\'><%= hint_title_117 %></div>')" onMouseOut="UnTip()" /></td>
  </tr>
  <% 
 If i_ses_i_dummy_head_org = 0 Then
%> 
  <tr>
  <td width="489">&nbsp;</td>
  <td width="270" colspan="3">&nbsp;</td>
  </tr>
  <tr>
  <td width="489" class="txtform"><%= fc_value_string(Session("ses_i_language"), "var_invite_global_01") %></td>
  <td width="270" colspan="3" class="txtform"><%= str_head_organization %></td>
  </tr>
  <tr>
  <td width="489" class="txtform"><%= fc_value_string(Session("ses_i_language"), "var_u_adm_d_55") %></td>
  <td width="270" colspan="3" class="txtform"><%= str_division %></td>
  </tr>
  <% end if %> 
  <tr>
  <td width="489" class="txtform"><%= fc_value_string(Session("ses_i_language"), "var_invite_tr_03") %></td>
  <td width="270" colspan="3" class="txtform"><%= str_trainer_name %></td>
  </tr>
    
  <tr>
  <td width="489" class="txtform">&nbsp;</td>
  <td width="270" height="26" colspan="3" class="txtform">&nbsp;</td>
  </tr>
    
<%If 1 > 2 Then %>
  <tr>
  <td width="489" class="txtform"><%= fc_value_string(Session("ses_i_language"), "var_u_adm_d_62") %></td>
  <td width="270" colspan="3">
  <select name="LST_Status" size="1" class="field" id="LST_Status" style="width:141px">
<%
'DropDown <Status>----------------------------------------------------------------------------------
If Session("ses_i_language")= 1 Then'0=keine auswahl 1=german 2=english
	SQL = "SELECT i_k_status, str_status_de FROM tbl_0701_status Order by str_status_de"
end if
If Session("ses_i_language")= 2 Then'0=keine auswahl 1=german 2=english
	SQL = "SELECT i_k_status, str_status FROM tbl_0701_status Order by str_status"
end if

'Con_Msg_06 = "-bitte wählen sie-" 
If Cint(i_fk_status) = 0 or IsEmpty(i_fk_status) or IsNull(i_fk_status) Then
	lst_wert = 1
	lst_string = Const_str_01'Con_Msg_06
	i_fk_status = 1
%>
  <option <%If lst_wert = Cint(i_fk_status) Then %>selected<%end if%> value="<%=lst_wert%>"><%=lst_string%></option>
<%
end if

If bol_objConn = True Then   
	Set rst_tmp = Server.CreateObject("ADODB.Recordset")
		rst_tmp.Open SQL, objConn, adOpenStatic, adLockReadOnly   

    If Not rst_tmp.EOF Then
	     Do While Not rst_tmp.EOF
          
            lst_wert = rst_tmp.Fields("i_k_status")
			If Session("ses_i_language")= 1 Then'german
		    	lst_string = rst_tmp.Fields("str_status_de")
			end if
			If Session("ses_i_language")= 2 Then'english
		    	lst_string = rst_tmp.Fields("str_status")
			end if

%>
    <option <%If lst_wert = i_fk_status Then %>selected<%end if%> value="<%=lst_wert%>"><%=lst_string%></option>
  <%
             rst_tmp.MoveNext
			 
        Loop
  		End if
    End if
		rst_tmp.Close
set rst_tmp = Nothing
'------------------------------------------------------------------------------------------------------
%>
  </select>
  </td>
  </tr>
  <%end if 'If 1 > 2 Then %>
    
  <tr>
  <td width="489" class="txtform"><%= fc_value_string(Session("ses_i_language"), "var_u_adm_d_18") %> <span class="Stil4">*</span></td>
  <td width="270" colspan="3" valign="middle"><input name="str_User_id" type="text" class="field" style="" value="<%=str_User_id%>" size="20" maxlength="20" onkeyup="check_leerzeichen_user_id(0)" onblur="check_leerzeichen_user_id(1)"/></td>
  </tr>
  <tr>
  <td width="489" class="txtform"><%= fc_value_string(Session("ses_i_language"), "var_u_adm_d_19") %> <span class="Stil4">*</span></td>
  <td width="270" colspan="3" valign="middle"><input name="str_pw" type="password" class="field" style="" value="<%=str_pw%>" size="20" maxlength="20" onkeyup="check_leerzeichen_pw(0)" onblur="check_leerzeichen_pw(1)"/></td>
  </tr>
  <tr>
  <td width="489" class="txtform"><%= fc_value_string(Session("ses_i_language"), "var_u_adm_d_20") %> <span class="Stil4">*</span></td>
  <td width="270" colspan="3" valign="middle"><input name="str_pw_confirm" type="password" class="field" style="" value="<%=str_pw_confirm%>" size="20" maxlength="20" onkeyup="check_leerzeichen_pw_confirm(0)" onblur="check_leerzeichen_pw_confirm(1)"/></td>
  </tr> 
  
<tr>
<td width="489" class="txtform">&nbsp;</td>
<td width="270" colspan="3" valign="middle"><input name="btnSub_04" type="submit" class="<%= str_save_button_size %>" value="Passwort ändern" /></td>
</tr> 
  
  <tr>
  <td width="489" class="txtform"><%= fc_value_string(Session("ses_i_language"), "var_u_adm_d_63") %> <span class="Stil4">*</span></td>
  <td width="270" colspan="3">
    
  <select name="LST_date_format" size="1" class="field" id="LST_date_format" style="width:141px" onchange="javascript: refresh_birthday()">
  <%
'DropDown ----------------------------------------------------------------------------------
If Session("ses_i_language")= 1 Then'0=keine auswahl 1=german 2=english
	SQL = "SELECT i_k_date_format, str_date_format_de FROM tbl_0606_date_format Order by i_sort"
end if
If Session("ses_i_language")= 2 Then'0=keine auswahl 1=german 2=english
	SQL = "SELECT i_k_date_format, str_date_format FROM tbl_0606_date_format Order by i_sort"
end if

If bol_objConn = True Then   
	Set rst_tmp = Server.CreateObject("ADODB.Recordset")
	rst_tmp.Open SQL, objConn, adOpenStatic, adLockReadOnly   

If Cint(i_fk_date_format) = 0 Then
    lst_wert = 0
	lst_string = Const_str_01'Con_Msg_06
%>
    <option selected="selected" value="<%=lst_wert%>"><%=lst_string%></option>
  <%
end if

    If Not rst_tmp.EOF Then
	     Do While Not rst_tmp.EOF
          
            lst_wert = rst_tmp.Fields("i_k_date_format")
			If Session("ses_i_language")= 1 Then'german
		    	lst_string = rst_tmp.Fields("str_date_format_de")
			end if
			If Session("ses_i_language")= 2 Then'english
		    	lst_string = rst_tmp.Fields("str_date_format")
			end if

%>
    <option <%If lst_wert = Cint(i_fk_date_format) Then %>selected<%end if%> value="<%=lst_wert%>"><%=lst_string%></option>
  <%
           rst_tmp.MoveNext
			 
        Loop
  		End if
    End if
		rst_tmp.Close
set rst_tmp = Nothing
'------------------------------------------------------------------------------------------------------
%>
  </select>
    
  <img src="images/ico/help16.png" alt="" width="16" height="16" hspace="10" class="help" onMouseOver="Tip('<%= hint_116 %>', TITLE, '<div class=\'TitleCls\'><%= hint_title_116 %></div>')" onMouseOut="UnTip()" /></td>
  </tr>                      
  <tr>
  <td width="489" class="txtform">&nbsp;</td>
  <td width="270" colspan="3" class="txtform">&nbsp;</td>
  </tr>
    
  <tr>
  <td width="489" height="50" colspan="4" valign="bottom" class="txttable"><strong><img src="images/ico/athlete_info32.png" width="32" height="32" hspace="5" border="0" /><br />
    <%= fc_value_string(Session("ses_i_language"), "var_u_adm_d_59") %></strong><img src="images/ico/help16.png" alt="" width="16" height="16" hspace="10" class="help" onMouseOver="Tip('<%= hint_118 %>', TITLE, '<div class=\'TitleCls\'><%= hint_title_118 %></div>')" onMouseOut="UnTip()" /></td>
  </tr>
  <tr>
  <td width="489">&nbsp;</td>
  <td width="270" colspan="3">&nbsp;</td>
  </tr>
  <tr>
  <td width="489" class="txtform"><%= fc_value_string(Session("ses_i_language"), "var_u_adm_d_28") %> <span class="Stil4">*</span></td>
  <td width="270" colspan="3"><input name="str_User_First_Name" type="text" class="field" style="" <%If i_measured > 0 Then %>disabled="disabled"<% end if%> value="<%=str_User_First_Name%>" size="40"></td>
  </tr>
  <tr>
  <td width="489" class="txtform"><%= fc_value_string(Session("ses_i_language"), "var_u_adm_d_29") %> <span class="Stil4">*</span></td>
  <td width="270" colspan="3"><input name="str_User_Last_Name" type="text" class="field" style="" <%If i_measured > 0 Then %>disabled="disabled"<% end if%> value="<%=str_User_Last_Name%>" size="40"></td>
  </tr>
  <tr>
  <td width="489">&nbsp;</td>
  <td width="270" colspan="3">&nbsp;</td>
  </tr>
    
  <tr id="tab_birthday_01">
  <td width="489" valign="bottom" class="txtform"><%= fc_value_string(Session("ses_i_language"), "var_u_adm_d_64") %> <span class="Stil4">*</span></td>
  <td width="270" colspan="3">
  <table border="0" cellpadding="0" cellspacing="0">
  <tr>
  <td width="50" valign="bottom" class="txtblock11"><div align="left"><%= fc_value_string(Session("ses_i_language"), "var_meas_at_29") %></div></td>
  <td width="50" valign="bottom" class="txtblock11"><div align="left"><%= fc_value_string(Session("ses_i_language"), "var_meas_at_30") %></div></td>
  <td valign="bottom" class="txtblock11"><div align="left"><%= fc_value_string(Session("ses_i_language"), "var_meas_at_31") %></div></td>
  </tr>
  <tr>
  <td><div align="left">
  <select name="LST_day_01" class="field" id="LST_day_01" style="width:45px" <%If i_measured > 0 Then %>disabled="disabled"<% end if%> onchange="javascript: refresh_birthday()">
  <%
For i_zaehler_date = 1 to 31


%>
    <option <%If i_zaehler_date = Cint(i_day) Then%>selected<%end if%> value="<%=i_zaehler_date%>"><%=i_zaehler_date%></option>
  <%
Next
%>
  </select>
  </div></td>
  <td><div align="left">
  <select name="LST_month_01" class="field" id="LST_month_01" style="width:45px" <%If i_measured > 0 Then %>disabled="disabled"<% end if%> onchange="javascript: refresh_birthday()">
  <%
For i_zaehler_date = 1 to 12

%>
    <option <%If i_zaehler_date = Cint(i_month) Then%>selected<%end if%> value="<%=i_zaehler_date%>"><%=i_zaehler_date%></option>
  <%

Next
%>
  </select>
  </div></td>
  <% 
'Response.Write("i_year_end: " & i_year_end & "<br>")
'Response.Write("i_year_start: " & i_year_start & "<br>")
%>
  <td><div align="left">
  <select name="LST_year_01" class="field" id="LST_year_01" style="width:60px" <%If i_measured > 0 Then %>disabled="disabled"<% end if%> onchange="javascript: refresh_birthday()">
  <%
For i_zaehler_date = Cint(i_year_start) to Cint(i_year_end)
%>
    <option <%If i_zaehler_date = Cint(i_year) Then%>selected<%end if%> value="<%=i_zaehler_date%>"><%=i_zaehler_date%></option>
  <%

Next

%>
  </select>
  </div></td>
    </tr>
  </table></td>
  </tr>
  <tr id="tab_birthday_02">
  <td width="489" valign="bottom" class="txtform"><%= fc_value_string(Session("ses_i_language"), "var_u_adm_d_64") %> <span class="Stil4">*</span></td>
  <td width="270" colspan="3">
  <table border="0" cellpadding="0" cellspacing="0">
  <tr>
  <td width="50" valign="bottom" class="txtblock11"><div align="left"><%= fc_value_string(Session("ses_i_language"), "var_meas_at_30") %></div></td>
  <td width="50" valign="bottom" class="txtblock11"><div align="left"><%= fc_value_string(Session("ses_i_language"), "var_meas_at_29") %></div></td>
  <td valign="bottom" class="txtblock11"><div align="left"><%= fc_value_string(Session("ses_i_language"), "var_meas_at_31") %></div></td>
  </tr>
  <tr>
  <td><div align="left">
    <select name="LST_month_02" class="field" id="LST_month_02" style="width:45px" <%If i_measured > 0 Then %>disabled="disabled"<% end if%> onchange="javascript: refresh_birthday()">
      <%
For i_zaehler_date = 1 to 12

%>
      <option <%If i_zaehler_date = Cint(i_month) Then%>selected<%end if%> value="<%=i_zaehler_date%>"><%=i_zaehler_date%></option>
      <%

Next
%>
      </select>
  </div></td>
  <td><div align="left">
    <select name="LST_day_02" class="field" id="LST_day_02" style="width:45px" <%If i_measured > 0 Then %>disabled="disabled"<% end if%> onchange="javascript: refresh_birthday()">
      <%
For i_zaehler_date = 1 to 31


%>
      <option <%If i_zaehler_date = Cint(i_day) Then%>selected<%end if%> value="<%=i_zaehler_date%>"><%=i_zaehler_date%></option>
      <%
Next
%>
      </select>
  </div></td>
  <td><div align="left">
    
  <select name="LST_year_02" class="field" id="LST_year_02" style="width:60px" <%If i_measured > 0 Then %>disabled="disabled"<% end if%> onchange="javascript: refresh_birthday()">
  <%
For i_zaehler_date = Cint(i_year_start) to Cint(i_year_end)
%>
    <option <%If i_zaehler_date = Cint(i_year) Then%>selected<%end if%> value="<%=i_zaehler_date%>"><%=i_zaehler_date%></option>
  <%

Next

%>
  </select>
  </div></td>
  </tr>
  </table></td>
  </tr>
  <tr>
  <td width="489" class="txtform"><%= fc_value_string(Session("ses_i_language"), "var_u_adm_d_65") %> <span class="Stil4">*</span><img src="images/ico/help16.png" alt="" width="16" height="16" hspace="10" class="help" onMouseOver="Tip('<%= hint_119 %>', TITLE, '<div class=\'TitleCls\'><%= hint_title_119 %></div>')" onMouseOut="UnTip()" /></td>
  <td width="270" colspan="3">
  <select name="LST_ethnic" size="1" class="fieldfull" <%If i_measured > 0 Then %>disabled="disabled"<% end if%> id="LST_ethnic">
  <%
'DropDown ----------------------------------------------------------------------------------
If Session("ses_i_language")= 1 Then'0=keine auswahl 1=german 2=english
	SQL = "SELECT lng_k_ethnic, str_ethnic_de FROM tbl_0602_ethnic Order by i_sort, str_ethnic_de"
end if
If Session("ses_i_language")= 2 Then'0=keine auswahl 1=german 2=english
	SQL = "SELECT lng_k_ethnic, str_ethnic FROM tbl_0602_ethnic Order by i_sort, str_ethnic"
end if

If bol_objConn = True Then   
	Set rst_tmp = Server.CreateObject("ADODB.Recordset")
	rst_tmp.Open SQL, objConn, adOpenStatic, adLockReadOnly   

'Con_Msg_06 = "-bitte wählen sie-" 
If Cint(lng_fk_ethnic) = 0 or IsEmpty(lng_fk_ethnic) or IsNull(lng_fk_ethnic) Then
	lst_wert = 0
	lst_string = Const_str_01'Con_Msg_06
	lng_fk_ethnic = 0
%>
  <option <%If lst_wert = Cint(lng_fk_ethnic) Then %>selected<%end if%> value="<%=lst_wert%>"><%=lst_string%></option>
  <%
end if

    If Not rst_tmp.EOF Then
	     Do While Not rst_tmp.EOF
          
            lst_wert = rst_tmp.Fields("lng_k_ethnic")
			If Session("ses_i_language")= 1 Then'german
		    	lst_string = rst_tmp.Fields("str_ethnic_de")
			end if
			If Session("ses_i_language")= 2 Then'english
		    	lst_string = rst_tmp.Fields("str_ethnic")
			end if
%>
    <option <%If lst_wert = Cint(lng_fk_ethnic) Then %>selected<%end if%> value="<%=lst_wert%>"><%=lst_string%></option>
  <%
             rst_tmp.MoveNext
			 
        Loop
  		End if
    End if
		rst_tmp.Close
set rst_tmp = Nothing
'------------------------------------------------------------------------------------------------------
%>
  </select></td>
  </tr>
  <tr>
  <td width="489" class="txtform"><%= fc_value_string(Session("ses_i_language"), "var_u_adm_d_66") %> <span class="Stil4">*</span></td>
  <td width="270" colspan="3">
  <select name="LST_Gender" size="1" class="fieldhalf" <%If i_measured > 0 Then %>disabled="disabled"<% end if%> id="LST_Gender">
  <%
'DropDown <Gender>----------------------------------------------------------------------------------
If Session("ses_i_language")= 1 Then'0=keine auswahl 1=german 2=english
	SQL = "SELECT i_k_gender, str_gender_de FROM tbl_0605_gender ORDER by str_gender_de ASC"
end if
If Session("ses_i_language")= 2 Then'0=keine auswahl 1=german 2=english
	SQL = "SELECT i_k_gender, str_gender FROM tbl_0605_gender ORDER by str_gender ASC"
end if

'Con_Msg_06 = "-bitte wählen sie-" 
If Cint(lng_fk_gender) = 0 or IsEmpty(lng_fk_gender) or IsNull(lng_fk_gender) Then
	lst_wert = 0
	lst_string = Const_str_01'Con_Msg_06
	lng_fk_gender = 0
%>
  <option <%If lst_wert = Cint(lng_fk_gender) Then %>selected<%end if%> value="<%=lst_wert%>"><%=lst_string%></option>
  <%
end if

If bol_objConn = True Then   
	Set rst_tmp = Server.CreateObject("ADODB.Recordset")
		rst_tmp.Open SQL, objConn, adOpenStatic, adLockReadOnly   

    If Not rst_tmp.EOF Then
	     Do While Not rst_tmp.EOF
          
            lst_wert = rst_tmp.Fields("i_k_gender")
			If Session("ses_i_language")= 1 Then'german
		    	lst_string = rst_tmp.Fields("str_gender_de")
			end if
			If Session("ses_i_language")= 2 Then'english
		    	lst_string = rst_tmp.Fields("str_gender")
			end if
%>
    <option <%If lst_wert = Cint(lng_fk_gender) Then %>selected<%end if%> value="<%=lst_wert%>"><%=lst_string%></option>
  <%
             rst_tmp.MoveNext
			 
        Loop
  		End if
    End if
		rst_tmp.Close
set rst_tmp = Nothing
'------------------------------------------------------------------------------------------------------
%>
  </select></td>
  </tr>
  <tr>
  <td width="489">&nbsp;</td>
  <td width="270" colspan="3">&nbsp;</td>
  </tr>
  <%           
'------------------------------------------------------------------------------------------------------
'------------------------------------------------------------------------------------------------------
'Athlete -----------------------------------------------------------------------------------------------
'------------------------------------------------------------------------------------------------------
'------------------------------------------------------------------------------------------------------
%>
  <tr>
  <td width="489" class="txtform"><%= fc_value_string(Session("ses_i_language"), "var_u_adm_d_67") %><span class="Stil4">*</span><img src="images/ico/help16.png" alt="" width="16" height="16" hspace="10" class="help" onMouseOver="Tip('<%= hint_134 %>', TITLE, '<div class=\'TitleCls\'><%= hint_title_134 %></div>')" onMouseOut="UnTip()" /></td>
  <td width="270" colspan="3"><div align="left">
  <select name="LST_sport_01" size="1" class="fieldfull" id="LST_sport_01" >
  <%
'DropDown <>----------------------------------------------------------------------------------
If Session("ses_i_language")= 1 Then'0=keine auswahl 1=german 2=english
	SQL = "SELECT lng_k_sport, str_sport_de FROM tbl_0521_sport Order by str_sport_de"
end if
If Session("ses_i_language")= 2 Then'0=keine auswahl 1=german 2=english
	SQL = "SELECT lng_k_sport, str_sport FROM tbl_0521_sport Order by str_sport"
end if

'Con_Msg_06 = "-bitte wählen sie-" 
If Cint(lng_fk_sport_01) = 0 or IsEmpty(lng_fk_sport_01) or IsNull(lng_fk_sport_01) Then
	lst_wert = 29
	lst_string = Const_str_01'Con_Msg_06
	lng_fk_sport_01 = 29
%>
  <option <%If lst_wert = Cint(lng_fk_sport_01) Then %>selected<%end if%> value="<%=lst_wert%>"><%=lst_string%></option>
  <%
end if

	Set rst_tmp = Server.CreateObject("ADODB.Recordset")
		rst_tmp.Open SQL, objConn, adOpenStatic, adLockReadOnly   

    If Not rst_tmp.EOF Then
	     Do While Not rst_tmp.EOF
          
           	lst_wert = rst_tmp.Fields("lng_k_sport")
			If Session("ses_i_language")= 1 Then'german
		    	lst_string = rst_tmp.Fields("str_sport_de")
			end if
			If Session("ses_i_language")= 2 Then'english
		    	lst_string = rst_tmp.Fields("str_sport")
			end if

%>
    <option <%If lst_wert = Cint(lng_fk_sport_01) Then %>selected<%end if%> value="<%=lst_wert%>"><%=lst_string%></option>
  <%
      rst_tmp.MoveNext
			 
        Loop
  	End if

		rst_tmp.Close
set rst_tmp = Nothing
'------------------------------------------------------------------------------------------------------
%>
  </select>
  </div></td>
  </tr>
  <tr>
  <td width="489" class="txtform"><%= fc_value_string(Session("ses_i_language"), "var_u_adm_d_68") %></td>
  <td width="270" colspan="3"><div align="left">
  <select name="LST_sport_02" size="1" class="fieldfull" id="LST_sport_02" >
  <%
'DropDown <>----------------------------------------------------------------------------------
If Session("ses_i_language")= 1 Then'0=keine auswahl 1=german 2=english
	SQL = "SELECT lng_k_sport, str_sport_de FROM tbl_0521_sport Order by str_sport_de"
end if
If Session("ses_i_language")= 2 Then'0=keine auswahl 1=german 2=english
	SQL = "SELECT lng_k_sport, str_sport FROM tbl_0521_sport Order by str_sport"
end if

'Con_Msg_06 = "-bitte wählen sie-" 
If Cint(lng_fk_sport_02) = 0 or IsEmpty(lng_fk_sport_02) or IsNull(lng_fk_sport_02) Then
	lst_wert = 29
	lst_string = Const_str_01'Con_Msg_06
	lng_fk_sport_02 = 29
%>
  <option <%If lst_wert = Cint(lng_fk_sport_02) Then %>selected<%end if%> value="<%=lst_wert%>"><%=lst_string%></option>
  <%
end if

	Set rst_tmp = Server.CreateObject("ADODB.Recordset")
		rst_tmp.Open SQL, objConn, adOpenStatic, adLockReadOnly   

    If Not rst_tmp.EOF Then
	     Do While Not rst_tmp.EOF
          
           	lst_wert = rst_tmp.Fields("lng_k_sport")
			If Session("ses_i_language")= 1 Then'german
		    	lst_string = rst_tmp.Fields("str_sport_de")
			end if
			If Session("ses_i_language")= 2 Then'english
		    	lst_string = rst_tmp.Fields("str_sport")
			end if

%>
    <option <%If lst_wert = Cint(lng_fk_sport_02) Then %>selected<%end if%> value="<%=lst_wert%>"><%=lst_string%></option>
  <%
      rst_tmp.MoveNext
			 
        Loop
  	End if

		rst_tmp.Close
set rst_tmp = Nothing
'------------------------------------------------------------------------------------------------------
%>
  </select>
  </div></td>
  </tr>
  <tr>
  <td width="489" class="txtform"><%= fc_value_string(Session("ses_i_language"), "var_u_adm_d_69") %></td>
  <td width="270" colspan="3"><div align="left">
  <select name="LST_sport_03" size="1" class="fieldfull" id="LST_sport_03" >
  <%
'DropDown <>----------------------------------------------------------------------------------
If Session("ses_i_language")= 1 Then'0=keine auswahl 1=german 2=english
	SQL = "SELECT lng_k_sport, str_sport_de FROM tbl_0521_sport Order by str_sport_de"
end if
If Session("ses_i_language")= 2 Then'0=keine auswahl 1=german 2=english
	SQL = "SELECT lng_k_sport, str_sport FROM tbl_0521_sport Order by str_sport"
end if

'Con_Msg_06 = "-bitte wählen sie-" 
If Cint(lng_fk_sport_03) = 0 or IsEmpty(lng_fk_sport_03) or IsNull(lng_fk_sport_03) Then
	lst_wert = 29
	lst_string = Const_str_01'Con_Msg_06
	lng_fk_sport_03 = 29
%>
  <option <%If lst_wert = Cint(lng_fk_sport_03) Then %>selected<%end if%> value="<%=lst_wert%>"><%=lst_string%></option>
  <%
end if

	Set rst_tmp = Server.CreateObject("ADODB.Recordset")
		rst_tmp.Open SQL, objConn, adOpenStatic, adLockReadOnly   

    If Not rst_tmp.EOF Then
	     Do While Not rst_tmp.EOF
          
           	lst_wert = rst_tmp.Fields("lng_k_sport")
			If Session("ses_i_language")= 1 Then'german
		    	lst_string = rst_tmp.Fields("str_sport_de")
			end if
			If Session("ses_i_language")= 2 Then'english
		    	lst_string = rst_tmp.Fields("str_sport")
			end if

%>
    <option <%If lst_wert = Cint(lng_fk_sport_03) Then %>selected<%end if%> value="<%=lst_wert%>"><%=lst_string%></option>
  <%
      rst_tmp.MoveNext
			 
        Loop
  	End if

		rst_tmp.Close
set rst_tmp = Nothing
'------------------------------------------------------------------------------------------------------
%>
  </select>
  </div></td>
  </tr>
  <tr>
    <td width="489">&nbsp;</td>
    <td width="270" colspan="3">&nbsp;</td>
  </tr>
  <tr>
  <td width="489" class="txtform"><%= fc_value_string(Session("ses_i_language"), "var_u_adm_d_70") %> <span class="Stil4">*</span></td>
  <td width="270" colspan="3"><div align="left">
  <select name="LST_i_measured_sytem_athlete" size="1" class="fieldhalf" id="LST_i_measured_sytem_athlete" onchange="javascript: refresh_measured_sytem_athlete()">
  <%
'DropDown <>----------------------------------------------------------------------------------
If Session("ses_i_language")= 1 Then'0=keine auswahl 1=german 2=english
	SQL = "SELECT i_k_measured_system, str_measured_system_de FROM tbl_0511_measured_sytem Order by i_sort"
end if
If Session("ses_i_language")= 2 Then'0=keine auswahl 1=german 2=english
	SQL = "SELECT i_k_measured_system, str_measured_system FROM tbl_0511_measured_sytem Order by i_sort"
end if

'Con_Msg_06 = "-bitte wählen sie-" 
If Cint(i_fk_measured_system_athlete) = 0 or IsEmpty(i_fk_measured_system_athlete) or IsNull(i_fk_measured_system_athlete) Then
	lst_wert = 0
	lst_string = Const_str_01'Con_Msg_06
	i_fk_measured_system_athlete = 0
%>
  <option <%If lst_wert = Cint(i_fk_measured_system_athlete) Then %>selected<%end if%> value="<%=lst_wert%>"><%=lst_string%></option>
  <%
end if

	Set rst_tmp = Server.CreateObject("ADODB.Recordset")
		rst_tmp.Open SQL, objConn, adOpenStatic, adLockReadOnly   

    If Not rst_tmp.EOF Then
	     Do While Not rst_tmp.EOF
          
           	lst_wert = rst_tmp.Fields("i_k_measured_system")
			If Session("ses_i_language")= 1 Then'german
		    	lst_string = rst_tmp.Fields("str_measured_system_de")
			end if
			If Session("ses_i_language")= 2 Then'english
		    	lst_string = rst_tmp.Fields("str_measured_system")
			end if

%>
    <option <%If lst_wert = Cint(i_fk_measured_system_athlete) Then %>selected<%end if%> value="<%=lst_wert%>"><%=lst_string%></option>
  <%
      rst_tmp.MoveNext
			 
        Loop
  	End if

		rst_tmp.Close
set rst_tmp = Nothing
'------------------------------------------------------------------------------------------------------
%>
  </select> 
  <img src="images/ico/help16.png" alt="" width="16" height="16" hspace="10" class="help" onMouseOver="Tip('<%= hint_120 %>', TITLE, '<div class=\'TitleCls\'><%= hint_title_120 %></div>')" onMouseOut="UnTip()" /></div></td>
  </tr>
  <tr id="tab_cm_athlete" style="display:none">
  <td width="489" class="txtform"><%= fc_value_string(Session("ses_i_language"), "var_u_adm_d_71") %><span class="Stil4">*</span><img src="images/ico/help16.png" alt="" width="16" height="16" hspace="10" class="help" onMouseOver="Tip('<%= hint_121 %>', TITLE, '<div class=\'TitleCls\'><%= hint_title_121 %></div>')" onMouseOut="UnTip()" /></td>
  <td width="270" align="left">
  <div align="left">
  <select name="LST_cm_athlete" size="1" class="field" id="LST_cm_athlete" style="width:80px">
  <%
'DropDown <>----------------------------------------------------------------------------------
SQL = "SELECT lng_k_measurement, str_readout FROM tbl_0512_measured_units WHERE i_fk_measurement_group = 8 Order by dbl_value_x"

	Set rst_tmp = Server.CreateObject("ADODB.Recordset")
		rst_tmp.Open SQL, objConn, adOpenStatic, adLockReadOnly   

    If Not rst_tmp.EOF Then
	     Do While Not rst_tmp.EOF
          
           	lst_wert = rst_tmp.Fields("lng_k_measurement")
		    lst_string = rst_tmp.Fields("str_readout")
%>
    <option <%If lst_wert = Cint(lng_fk_cm_athlete) Then %>selected<%end if%> value="<%=lst_wert%>"><%=lst_string%></option>
    <%
             rst_tmp.MoveNext
			 
        Loop
  	End if

		rst_tmp.Close
set rst_tmp = Nothing
'------------------------------------------------------------------------------------------------------
%>
  </select>
  </div></td>
  <td width="90" align="left">
  <div align="left">
  <select name="LST_cm_deci_athlete" size="1" class="fieldmeasure" id="LST_cm_deci_athlete">
  <%
'DropDown <>----------------------------------------------------------------------------------
SQL = "SELECT lng_k_measurement, str_readout FROM tbl_0512_measured_units WHERE i_fk_measurement_group = 9 Order by dbl_value_x"

	Set rst_tmp = Server.CreateObject("ADODB.Recordset")
		rst_tmp.Open SQL, objConn, adOpenStatic, adLockReadOnly   

    If Not rst_tmp.EOF Then
	     Do While Not rst_tmp.EOF
          
           	lst_wert = rst_tmp.Fields("lng_k_measurement")
		    lst_string = rst_tmp.Fields("str_readout")
%>
    <option <%If lst_wert = Cint(lng_fk_cm_deci_athlete) Then %>selected<%end if%> value="<%=lst_wert%>"><%=lst_string%></option>
    <%
             rst_tmp.MoveNext
			 
        Loop
  	End if

		rst_tmp.Close
set rst_tmp = Nothing
'------------------------------------------------------------------------------------------------------
%>
  </select>
  </div></td>
  <td align="left"></td>
  </tr>
  <tr id="tab_kg_athlete" style="display:none">
  <td width="489" class="txtform"><%= fc_value_string(Session("ses_i_language"), "var_u_adm_d_72") %><span class="Stil4">*</span></td>
  <td width="270" align="left">
  <div align="left">
  <select name="LST_kg" size="1" class="field" id="LST_kg" style="width:80px">
  <%
'DropDown <>----------------------------------------------------------------------------------
SQL = "SELECT lng_k_measurement, str_readout FROM tbl_0512_measured_units WHERE i_fk_measurement_group = 11 Order by dbl_value_x"

	Set rst_tmp = Server.CreateObject("ADODB.Recordset")
		rst_tmp.Open SQL, objConn, adOpenStatic, adLockReadOnly   

    If Not rst_tmp.EOF Then
	     Do While Not rst_tmp.EOF
          
           	lst_wert = rst_tmp.Fields("lng_k_measurement")
		    lst_string = rst_tmp.Fields("str_readout")
%>
    <option <%If lst_wert = Cint(lng_kg_athlete) Then %>selected<%end if%> value="<%=lst_wert%>"><%=lst_string%></option>
    <%
             rst_tmp.MoveNext
			 
        Loop
  	End if

		rst_tmp.Close
set rst_tmp = Nothing
'------------------------------------------------------------------------------------------------------
%>
  </select>
  </div></td>
  <td width="90" align="left">&nbsp;</td>
  <td align="left">&nbsp;</td>
  </tr>
  <tr id="tab_feet_08_athlete" style="display:none">
  <td width="489" class="txtform"><%= fc_value_string(Session("ses_i_language"), "var_u_adm_d_71") %>  <span class="Stil4">*</span><img src="images/ico/help16.png" alt="" width="16" height="16" hspace="10" class="help" onMouseOver="Tip('<%= hint_122 %>', TITLE, '<div class=\'TitleCls\'><%= hint_title_122 %></div>')" onMouseOut="UnTip()" /></td>
  <td width="270" align="left">
  <div align="left">
  <select name="LST_feet_08_athlete" size="1" class="field" style="width:80px" id="LST_feet_08_athlete" >
  <%
'DropDown <>----------------------------------------------------------------------------------
SQL = "SELECT lng_k_measurement, str_readout FROM tbl_0512_measured_units WHERE i_fk_measurement_group = 1 Order by dbl_value_x"

	Set rst_tmp = Server.CreateObject("ADODB.Recordset")
		rst_tmp.Open SQL, objConn, adOpenStatic, adLockReadOnly   

    If Not rst_tmp.EOF Then
	     Do While Not rst_tmp.EOF
          
           	lst_wert = rst_tmp.Fields("lng_k_measurement")
		    lst_string = rst_tmp.Fields("str_readout")

%>
    <option <%If lst_wert = Cint(lng_fk_feet_athlete) Then %>selected<%end if%> value="<%=lst_wert%>"><%=lst_string%></option>
    <%
             rst_tmp.MoveNext
			 
        Loop
  	End if

		rst_tmp.Close
set rst_tmp = Nothing
'------------------------------------------------------------------------------------------------------
%>
  </select>
  </div></td>
  <td width="90" align="left">
  <div align="left">
  <select name="LST_inch_08_athlete" size="1" class="fieldmeasure" id="LST_inch_08_athlete">
  <%
'DropDown <>----------------------------------------------------------------------------------
SQL = "SELECT lng_k_measurement, str_readout FROM tbl_0512_measured_units WHERE i_fk_measurement_group = 2 Order by dbl_value_x"

	Set rst_tmp = Server.CreateObject("ADODB.Recordset")
		rst_tmp.Open SQL, objConn, adOpenStatic, adLockReadOnly   

    If Not rst_tmp.EOF Then
	     Do While Not rst_tmp.EOF
          
           	lst_wert = rst_tmp.Fields("lng_k_measurement")
		    lst_string = rst_tmp.Fields("str_readout")
%>
    <option <%If lst_wert = Cint(lng_fk_inch_athlete) Then %>selected<%end if%> value="<%=lst_wert%>"><%=lst_string%></option>
    <%
             rst_tmp.MoveNext
			 
        Loop
  	End if

		rst_tmp.Close
set rst_tmp = Nothing
'------------------------------------------------------------------------------------------------------
%>
  </select>
  </div></td>
  <td align="left">
  <div align="left">
  <select name="LST_eighths_inch_athlete" size="1" class="fieldmeasure" id="LST_eighths_inch_athlete">
  <%
'DropDown <>----------------------------------------------------------------------------------
SQL = "SELECT lng_k_measurement, str_readout FROM tbl_0512_measured_units WHERE i_fk_measurement_group = 5 Order by dbl_value_x"

	Set rst_tmp = Server.CreateObject("ADODB.Recordset")
		rst_tmp.Open SQL, objConn, adOpenStatic, adLockReadOnly   

    If Not rst_tmp.EOF Then
	     Do While Not rst_tmp.EOF
          
           	lst_wert = rst_tmp.Fields("lng_k_measurement")
		    lst_string = rst_tmp.Fields("str_readout")
%>
    <option <%If lst_wert = Cint(lng_fk_eighths_inch_athlete) Then %>selected<%end if%> value="<%=lst_wert%>"><%=lst_string%></option>
    <%
             rst_tmp.MoveNext
			 
        Loop
  	End if

		rst_tmp.Close
set rst_tmp = Nothing
'------------------------------------------------------------------------------------------------------
%>
  </select>
  </div></td>
  </tr>
  <tr id="tab_feet_16_athlete" style="display:none">
  <td width="489" class="txtform"><%= fc_value_string(Session("ses_i_language"), "var_u_adm_d_71") %> <span class="Stil4">*</span><img src="images/ico/help16.png" alt="" width="16" height="16" hspace="10" class="help" onMouseOver="Tip('<%= hint_122 %>', TITLE, '<div class=\'TitleCls\'><%= hint_title_122 %></div>')" onMouseOut="UnTip()" /></td>
  <td width="270" align="left">
  <div align="left">
  <select name="LST_feet_16_athlete" size="1" class="field" style="width:80px" id="LST_feet_16_athlete" >
  <%
'DropDown <>----------------------------------------------------------------------------------
SQL = "SELECT lng_k_measurement, str_readout FROM tbl_0512_measured_units WHERE i_fk_measurement_group = 1 Order by dbl_value_x"

	Set rst_tmp = Server.CreateObject("ADODB.Recordset")
		rst_tmp.Open SQL, objConn, adOpenStatic, adLockReadOnly   

    If Not rst_tmp.EOF Then
	     Do While Not rst_tmp.EOF
          
           	lst_wert = rst_tmp.Fields("lng_k_measurement")
		    lst_string = rst_tmp.Fields("str_readout")

%>
    <option <%If lst_wert = Cint(lng_fk_feet_athlete) Then %>selected<%end if%> value="<%=lst_wert%>"><%=lst_string%></option>
  <%
             rst_tmp.MoveNext
			 
        Loop
  	End if

		rst_tmp.Close
set rst_tmp = Nothing
'------------------------------------------------------------------------------------------------------
%>
  </select>
  </div></td>
  <td width="90" align="left">
  <div align="left">
  <select name="LST_inch_16_athlete" size="1" class="fieldmeasure" id="LST_inch_16_athlete">
  <%
'DropDown <>----------------------------------------------------------------------------------
SQL = "SELECT lng_k_measurement, str_readout FROM tbl_0512_measured_units WHERE i_fk_measurement_group = 2 Order by dbl_value_x"

	Set rst_tmp = Server.CreateObject("ADODB.Recordset")
		rst_tmp.Open SQL, objConn, adOpenStatic, adLockReadOnly   

    If Not rst_tmp.EOF Then
	     Do While Not rst_tmp.EOF
          
           	lst_wert = rst_tmp.Fields("lng_k_measurement")
		    lst_string = rst_tmp.Fields("str_readout")
%>
    <option <%If lst_wert = Cint(lng_fk_inch_athlete) Then %>selected<%end if%> value="<%=lst_wert%>"><%=lst_string%></option>
    <%
             rst_tmp.MoveNext
			 
        Loop
  	End if

		rst_tmp.Close
set rst_tmp = Nothing
'------------------------------------------------------------------------------------------------------
%>
  </select>
  </div></td>
  <td align="left">
  <div align="left">
  <select name="LST_sixteenth_athlete" size="1" class="fieldmeasure" id="LST_sixteenth_athlete">
  <%
'DropDown <>----------------------------------------------------------------------------------
SQL = "SELECT lng_k_measurement, str_readout FROM tbl_0512_measured_units WHERE i_fk_measurement_group = 6 Order by dbl_value_x"

	Set rst_tmp = Server.CreateObject("ADODB.Recordset")
		rst_tmp.Open SQL, objConn, adOpenStatic, adLockReadOnly   

    If Not rst_tmp.EOF Then
	     Do While Not rst_tmp.EOF
          
           	lst_wert = rst_tmp.Fields("lng_k_measurement")
		    lst_string = rst_tmp.Fields("str_readout")
%>
    <option <%If lst_wert = Cint(lng_fk_sixteenth_inch_athlete) Then %>selected<%end if%> value="<%=lst_wert%>"><%=lst_string%></option>
    <%
             rst_tmp.MoveNext
			 
        Loop
  	End if

		rst_tmp.Close
set rst_tmp = Nothing
'------------------------------------------------------------------------------------------------------
%>
  </select>
  </div></td>
  </tr>
  <tr id="tab_feet_32_athlete" style="display:none">
  <td width="489" class="txtform"><%= fc_value_string(Session("ses_i_language"), "var_u_adm_d_71") %>  <span class="Stil4">*</span><img src="images/ico/help16.png" alt="" width="16" height="16" hspace="10" class="help" onMouseOver="Tip('<%= hint_122 %>', TITLE, '<div class=\'TitleCls\'><%= hint_title_122 %></div>')" onMouseOut="UnTip()" /></td>
  <td width="270" align="left">
  <div align="left">
  <select name="LST_feet_32_athlete" size="1" class="field" id="LST_feet_32_athlete" style="width:80px">
  <%
'DropDown <>----------------------------------------------------------------------------------
SQL = "SELECT lng_k_measurement, str_readout FROM tbl_0512_measured_units WHERE i_fk_measurement_group = 1 Order by dbl_value_x"

	Set rst_tmp = Server.CreateObject("ADODB.Recordset")
		rst_tmp.Open SQL, objConn, adOpenStatic, adLockReadOnly   

    If Not rst_tmp.EOF Then
	     Do While Not rst_tmp.EOF
          
           	lst_wert = rst_tmp.Fields("lng_k_measurement")
		    lst_string = rst_tmp.Fields("str_readout")

%>
    <option <%If lst_wert = Cint(lng_fk_feet_athlete) Then %>selected<%end if%> value="<%=lst_wert%>"><%=lst_string%></option>
    <%
             rst_tmp.MoveNext
			 
        Loop
  	End if

		rst_tmp.Close
set rst_tmp = Nothing
'------------------------------------------------------------------------------------------------------
%>
  </select>
  </div></td>
  <td width="90" align="left">
  <div align="left">
  <select name="LST_inch_32_athlete" size="1" class="fieldmeasure" id="LST_inch_32_athlete">
  <%
'DropDown <>----------------------------------------------------------------------------------
SQL = "SELECT lng_k_measurement, str_readout FROM tbl_0512_measured_units WHERE i_fk_measurement_group = 2 Order by dbl_value_x"

	Set rst_tmp = Server.CreateObject("ADODB.Recordset")
		rst_tmp.Open SQL, objConn, adOpenStatic, adLockReadOnly   

    If Not rst_tmp.EOF Then
	     Do While Not rst_tmp.EOF
          
           	lst_wert = rst_tmp.Fields("lng_k_measurement")
		    lst_string = rst_tmp.Fields("str_readout")
%>
    <option <%If lst_wert = Cint(lng_fk_inch_athlete) Then %>selected<%end if%> value="<%=lst_wert%>"><%=lst_string%></option>
    <%
             rst_tmp.MoveNext
			 
        Loop
  	End if

		rst_tmp.Close
set rst_tmp = Nothing
'------------------------------------------------------------------------------------------------------
%>
  </select>
  </div></td>
  <td align="left">
  <div align="left">
  <select name="LST_thirtysecond_inch_athlete" size="1" class="fieldmeasure" id="LST_thirtysecond_inch_athlete">
  <%
'DropDown <>----------------------------------------------------------------------------------
SQL = "SELECT lng_k_measurement, str_readout FROM tbl_0512_measured_units WHERE i_fk_measurement_group = 7 Order by dbl_value_x"

	Set rst_tmp = Server.CreateObject("ADODB.Recordset")
		rst_tmp.Open SQL, objConn, adOpenStatic, adLockReadOnly   

    If Not rst_tmp.EOF Then
	     Do While Not rst_tmp.EOF
          
           	lst_wert = rst_tmp.Fields("lng_k_measurement")
		    lst_string = rst_tmp.Fields("str_readout")
%>
    <option <%If lst_wert = Cint(lng_fk_thirtysecond_inch_athlete) Then %>selected<%end if%> value="<%=lst_wert%>"><%=lst_string%></option>
    <%
             rst_tmp.MoveNext
			 
        Loop
  	End if

		rst_tmp.Close
set rst_tmp = Nothing
'------------------------------------------------------------------------------------------------------
%>
  </select>
  </div></td>
  </tr>
  <tr id="tab_lbs_athlete" style="display:none">
  <td width="489" class="txtform"><%= fc_value_string(Session("ses_i_language"), "var_u_adm_d_72") %> <span class="Stil4">*</span></td>
  <td width="270" align="left">
  <div align="left">
  <select name="LST_lbs" size="1" class="field" id="LST_lbs" style="width:80px">
  <%
'DropDown <>----------------------------------------------------------------------------------
SQL = "SELECT lng_k_measurement, str_readout FROM tbl_0512_measured_units WHERE i_fk_measurement_group = 10 Order by dbl_value_x"

	Set rst_tmp = Server.CreateObject("ADODB.Recordset")
		rst_tmp.Open SQL, objConn, adOpenStatic, adLockReadOnly   

    If Not rst_tmp.EOF Then
	     Do While Not rst_tmp.EOF
          
           	lst_wert = rst_tmp.Fields("lng_k_measurement")
		    lst_string = rst_tmp.Fields("str_readout")
%>
    <option <%If lst_wert = Cint(lng_fk_lbs) Then %>selected<%end if%> value="<%=lst_wert%>"><%=lst_string%></option>
    <%
             rst_tmp.MoveNext
			 
        Loop
  	End if

		rst_tmp.Close
set rst_tmp = Nothing
'------------------------------------------------------------------------------------------------------
%>
  </select>
  </div></td>
  <td width="90" align="left">&nbsp;</td>
  <td align="left">&nbsp;</td>
  </tr>
  <%           
'------------------------------------------------------------------------------------------------------
'------------------------------------------------------------------------------------------------------
'Mother -----------------------------------------------------------------------------------------------
'------------------------------------------------------------------------------------------------------
'------------------------------------------------------------------------------------------------------
%>
  <tr>
  <td width="489">&nbsp;</td>
  <td width="270" colspan="3">&nbsp;</td>
  </tr>
  <td width="489" class="txtform"><%= fc_value_string(Session("ses_i_language"), "var_u_adm_d_25") %> <span class="Stil4">*</span></td>
  <td width="270" colspan="3">
  <select name="LST_Country" size="1" class="fieldfull" width="40" <%If i_measured > 0 Then %>disabled="disabled"<% end if%> id="LST_Country">
  <%
If isNull(lng_fk_country) or IsEmpty(lng_fk_country) or lng_fk_country = 0 Then
	lng_fk_country = 10'10=Austria - 185=Usa
end if

'DropDown <Status>----------------------------------------------------------------------------------
SQL = "SELECT lng_k_country, str_country_long FROM tbl_0601_country WHERE i_lock = 0 ORDER by str_country_long"

If bol_objConn = True Then   
	Set rst_tmp = Server.CreateObject("ADODB.Recordset")
		rst_tmp.Open SQL, objConn, adOpenStatic, adLockReadOnly   

    If Not rst_tmp.EOF Then
	     Do While Not rst_tmp.EOF
          
            lst_wert = rst_tmp.Fields("lng_k_country")
		    lst_string = rst_tmp.Fields("str_country_long")

%>
    <option <%If lst_wert = Cint(lng_fk_country) Then %>selected<%end if%> value="<%=lst_wert%>"><%=lst_string%></option>
  <%
             rst_tmp.MoveNext
			 
        Loop
  		End if
    End if
		rst_tmp.Close
set rst_tmp = Nothing
'------------------------------------------------------------------------------------------------------
%>
  </select></td>
  </tr>
    
  <tr>
  <td width="489" class="txtform"><%= fc_value_string(Session("ses_i_language"), "var_u_adm_d_16") %> <span class="Stil4">*</span></td>
  <td width="270" colspan="3"><input name="str_User_email" type="text" class="field" onblur="eMailAdresseOK(this)" value="<%=str_User_email%>" size="40" maxlength="40"></td>
  </tr>
  <tr>
  <td width="489" class="txtform"><%= fc_value_string(Session("ses_i_language"), "var_u_adm_d_32") %><span class="Stil4">&nbsp;*</span></td>
  <td width="270" colspan="3"><input name="str_User_email_confirm" type="text" class="field" onblur="eMailAdresseOK(this)" value="<%=str_User_email_confirm%>" size="40" maxlength="40" ></td>
  </tr>
  <tr>
  <td width="489" class="txtform"><%= fc_value_string(Session("ses_i_language"), "var_u_adm_d_33") %></td>
  <td width="270" colspan="3"><input name="str_User_email_02" type="text" class="field" onblur="eMailAdresseOK(this)" value="<%=str_User_email_02%>" size="40" maxlength="40" ></td>
  <tr>
  <td width="489" class="txtform">&nbsp;</td>
  <td width="270" colspan="3">&nbsp;</td>
  <tr>
  <td width="489" height="50" colspan="4" valign="bottom" class="txttable">
  <table width="470" border="0" cellspacing="0" cellpadding="0">
  <tr>
  <td width="420" height="50" valign="bottom"><strong><img src="images/ico/woman_info32.png" width="32" height="32" hspace="5" /><br />
    <%= fc_value_string(Session("ses_i_language"), "var_u_adm_d_60") %></strong><img src="images/ico/help16.png" alt="" width="16" height="16" hspace="10" class="help" onMouseOver="Tip('<%= hint_125 %>', TITLE, '<div class=\'TitleCls\'><%= hint_title_125 %></div>')" onMouseOut="UnTip()" /></td>
  <td width="50" height="50" align="right" valign="bottom">&nbsp;</td>
  </tr>
  </table></td>
  <tr>
  <td width="489">&nbsp;</td>
  <td width="270" colspan="3">&nbsp;</td>
  </tr>
  <tr>
  <td width="489" class="txtform"><%= fc_value_string(Session("ses_i_language"), "var_u_adm_d_73") %> <span class="Stil4">*</span></td>
  <td width="270" colspan="3"><div align="left">
  <select name="LST_i_measured_sytem_mother" size="1" class="fieldhalf" id="LST_i_measured_sytem_mother" <%If i_measured > 0 Then %>disabled="disabled"<% end if%> onchange="javascript: refresh_measured_sytem_mother()">
  <%
'DropDown <>----------------------------------------------------------------------------------
If Session("ses_i_language")= 1 Then'0=keine auswahl 1=german 2=english
	SQL = "SELECT i_k_measured_system, str_measured_system_de FROM tbl_0511_measured_sytem Order by i_sort"
end if
If Session("ses_i_language")= 2 Then'0=keine auswahl 1=german 2=english
	SQL = "SELECT i_k_measured_system, str_measured_system FROM tbl_0511_measured_sytem Order by i_sort"
end if

'Con_Msg_06 = "-bitte wählen sie-" 
If Cint(i_fk_measured_system_mother) = 0 or IsEmpty(i_fk_measured_system_mother) or IsNull(i_fk_measured_system_mother) Then
	lst_wert = 0
	lst_string = Const_str_01'Con_Msg_06
	i_fk_measured_system_mother = 0
%>
  <option <%If lst_wert = Cint(i_fk_measured_system_mother) Then %>selected<%end if%> value="<%=lst_wert%>"><%=lst_string%></option>
  <%
end if

	Set rst_tmp = Server.CreateObject("ADODB.Recordset")
		rst_tmp.Open SQL, objConn, adOpenStatic, adLockReadOnly   

    If Not rst_tmp.EOF Then
	     Do While Not rst_tmp.EOF
          
           	lst_wert = rst_tmp.Fields("i_k_measured_system")
			If Session("ses_i_language")= 1 Then'german
		    	lst_string = rst_tmp.Fields("str_measured_system_de")
			end if
			If Session("ses_i_language")= 2 Then'english
		    	lst_string = rst_tmp.Fields("str_measured_system")
			end if

%>
    <option <%If lst_wert = Cint(i_fk_measured_system_mother) Then %>selected<%end if%> value="<%=lst_wert%>"><%=lst_string%></option>
    <%
      rst_tmp.MoveNext
			 
        Loop
  	End if

		rst_tmp.Close
set rst_tmp = Nothing
'------------------------------------------------------------------------------------------------------
%>
  </select> 
  </div></td>
  </tr>
  <tr>
  <td class="txtform"><%= fc_value_string(Session("ses_i_language"), "var_invite_global_09") %></td>
  <td colspan="3">&nbsp;</td>
  </tr>
  <tr>
  <td class="txtform"><%= fc_value_string(Session("ses_i_language"), "var_u_adm_d_74") %><span class="Stil4"> *</span></td>
  <td><input type="checkbox" alt="Auswählen, falls die Information im Moment nicht zur Verfügung steht." title="Auswählen, falls die Information im Moment nicht zur Verfügung steht." name="ckk_i_mother_default" value="checkbox"<%If i_mother_default = 1 Then%>CHECKED<%end if%> onclick="javascript: refresh_measured_sytem_mother()"/>  <img src="images/ico/help16.png" alt="" width="16" height="16" hspace="10" class="help" onMouseOver="Tip('<%= hint_150 %>', TITLE, '<div class=\'TitleCls\'><%= hint_title_150 %></div>')" onMouseOut="UnTip()" /></td>
  <td colspan="2">&nbsp;</td>
  </tr>
    
  <tr id="tab_cm_mother" style="display:none">
  <td width="489" class="txtform"><%= fc_value_string(Session("ses_i_language"), "var_u_adm_d_71") %> <span class="Stil4">*</span></td>
  <td width="270">
  <div align="left">
  <select name="LST_cm_mother" size="1" class="fieldmeasure" <%If i_measured > 0 Then %>disabled="disabled"<% end if%> id="LST_cm_mother" style="">
    <%
'DropDown <>----------------------------------------------------------------------------------
SQL = "SELECT lng_k_measurement, str_readout FROM tbl_0512_measured_units WHERE i_fk_measurement_group = 8 Order by dbl_value_x"

	Set rst_tmp = Server.CreateObject("ADODB.Recordset")
		rst_tmp.Open SQL, objConn, adOpenStatic, adLockReadOnly   

    If Not rst_tmp.EOF Then
	     Do While Not rst_tmp.EOF
          
           	lst_wert = rst_tmp.Fields("lng_k_measurement")
		    lst_string = rst_tmp.Fields("str_readout")
%>
    <option <%If lst_wert = Cint(lng_fk_cm_mother) Then %>selected<%end if%> value="<%=lst_wert%>"><%=lst_string%></option>
    <%
             rst_tmp.MoveNext
			 
        Loop
  	End if

		rst_tmp.Close
set rst_tmp = Nothing
'------------------------------------------------------------------------------------------------------
%>
  </select>
  </div></td>
  <td width="90">
    <div align="left">
      <select name="LST_cm_deci_mother" size="1" class="fieldmeasure" <%If i_measured > 0 Then %>disabled="disabled"<% end if%> id="LST_cm_deci_mother" style="">
        <%
'DropDown <>----------------------------------------------------------------------------------
SQL = "SELECT lng_k_measurement, str_readout FROM tbl_0512_measured_units WHERE i_fk_measurement_group = 9 Order by dbl_value_x"

	Set rst_tmp = Server.CreateObject("ADODB.Recordset")
		rst_tmp.Open SQL, objConn, adOpenStatic, adLockReadOnly   

    If Not rst_tmp.EOF Then
	     Do While Not rst_tmp.EOF
          
           	lst_wert = rst_tmp.Fields("lng_k_measurement")
		    lst_string = rst_tmp.Fields("str_readout")
%>
        <option <%If lst_wert = Cint(lng_fk_cm_deci_mother) Then %>selected<%end if%> value="<%=lst_wert%>"><%=lst_string%></option>
        <%
             rst_tmp.MoveNext
			 
        Loop
  	End if

		rst_tmp.Close
set rst_tmp = Nothing
'------------------------------------------------------------------------------------------------------
%>
  </select>
  </div></td>
  <td>&nbsp;</td>
  </tr>
  <tr id="tab_feet_08_mother" style="display:none">
  <td width="489" class="txtform"><%= fc_value_string(Session("ses_i_language"), "var_u_adm_d_71") %><span class="Stil4">*</span></td>
  <td width="270">
  <div align="left">
  <select name="LST_feet_08_mother" size="1" class="fieldmeasure" <%If i_measured > 0 Then %>disabled="disabled"<% end if%> id="LST_feet_08_mother" >
  <%
'DropDown <>----------------------------------------------------------------------------------
SQL = "SELECT lng_k_measurement, str_readout FROM tbl_0512_measured_units WHERE i_fk_measurement_group = 1 Order by dbl_value_x"

	Set rst_tmp = Server.CreateObject("ADODB.Recordset")
		rst_tmp.Open SQL, objConn, adOpenStatic, adLockReadOnly   

    If Not rst_tmp.EOF Then
	     Do While Not rst_tmp.EOF
          
           	lst_wert = rst_tmp.Fields("lng_k_measurement")
		    lst_string = rst_tmp.Fields("str_readout")

%>
    <option <%If lst_wert = Cint(lng_fk_feet_mother) Then %>selected<%end if%> value="<%=lst_wert%>"><%=lst_string%></option>
  <%
             rst_tmp.MoveNext
			 
        Loop
  	End if

		rst_tmp.Close
set rst_tmp = Nothing
'------------------------------------------------------------------------------------------------------
%>
  </select>
  </div></td>
  <td width="90">
  <div align="left">
  <select name="LST_inch_08_mother" size="1" class="fieldmeasure" <%If i_measured > 0 Then %>disabled="disabled"<% end if%> id="LST_inch_08_mother" style="">
  <%
'DropDown <>----------------------------------------------------------------------------------
SQL = "SELECT lng_k_measurement, str_readout FROM tbl_0512_measured_units WHERE i_fk_measurement_group = 2 Order by dbl_value_x"

	Set rst_tmp = Server.CreateObject("ADODB.Recordset")
		rst_tmp.Open SQL, objConn, adOpenStatic, adLockReadOnly   

    If Not rst_tmp.EOF Then
	     Do While Not rst_tmp.EOF
          
           	lst_wert = rst_tmp.Fields("lng_k_measurement")
		    lst_string = rst_tmp.Fields("str_readout")
%>
    <option <%If lst_wert = Cint(lng_fk_inch_mother) Then %>selected<%end if%> value="<%=lst_wert%>"><%=lst_string%></option>
  <%
             rst_tmp.MoveNext
			 
        Loop
  	End if

		rst_tmp.Close
set rst_tmp = Nothing
'------------------------------------------------------------------------------------------------------
%>
  </select>
  </div></td>
  <td>
  <div align="left">
  <select name="LST_eighths_inch_mother" size="1" class="fieldmeasure" <%If i_measured > 0 Then %>disabled="disabled"<% end if%> id="LST_eighths_inch_mother" style="">
  <%
'DropDown <>----------------------------------------------------------------------------------
SQL = "SELECT lng_k_measurement, str_readout FROM tbl_0512_measured_units WHERE i_fk_measurement_group = 5 Order by dbl_value_x"

	Set rst_tmp = Server.CreateObject("ADODB.Recordset")
		rst_tmp.Open SQL, objConn, adOpenStatic, adLockReadOnly   

    If Not rst_tmp.EOF Then
	     Do While Not rst_tmp.EOF
          
           	lst_wert = rst_tmp.Fields("lng_k_measurement")
		    lst_string = rst_tmp.Fields("str_readout")
%>
    <option <%If lst_wert = Cint(lng_fk_eighths_inch_mother) Then %>selected<%end if%> value="<%=lst_wert%>"><%=lst_string%></option>
  <%
             rst_tmp.MoveNext
			 
        Loop
  	End if

		rst_tmp.Close
set rst_tmp = Nothing
'------------------------------------------------------------------------------------------------------
%>
  </select>
  </div></td>
  </tr>
  <tr id="tab_feet_16_mother" style="display:none">
  <td width="489" class="txtform"><%= fc_value_string(Session("ses_i_language"), "var_u_adm_d_71") %><span class="Stil4">*</span></td>
  <td width="270">
  <div align="left">
  <select name="LST_feet_16_mother" size="1" class="fieldmeasure" <%If i_measured > 0 Then %>disabled="disabled"<% end if%> id="LST_feet_16_mother" >
  <%
'DropDown <>----------------------------------------------------------------------------------
SQL = "SELECT lng_k_measurement, str_readout FROM tbl_0512_measured_units WHERE i_fk_measurement_group = 1 Order by dbl_value_x"

	Set rst_tmp = Server.CreateObject("ADODB.Recordset")
		rst_tmp.Open SQL, objConn, adOpenStatic, adLockReadOnly   

    If Not rst_tmp.EOF Then
	     Do While Not rst_tmp.EOF
          
           	lst_wert = rst_tmp.Fields("lng_k_measurement")
		    lst_string = rst_tmp.Fields("str_readout")

%>
    <option <%If lst_wert = Cint(lng_fk_feet_mother) Then %>selected<%end if%> value="<%=lst_wert%>"><%=lst_string%></option>
  <%
             rst_tmp.MoveNext
			 
        Loop
  	End if

		rst_tmp.Close
set rst_tmp = Nothing
'------------------------------------------------------------------------------------------------------
%>
  </select>
  </div></td>
  <td width="90">
  <div align="left">
  <select name="LST_inch_16_mother" size="1" class="fieldmeasure" <%If i_measured > 0 Then %>disabled="disabled"<% end if%> id="LST_inch_16_mother" style="">
  <%
'DropDown <>----------------------------------------------------------------------------------
SQL = "SELECT lng_k_measurement, str_readout FROM tbl_0512_measured_units WHERE i_fk_measurement_group = 2 Order by dbl_value_x"

	Set rst_tmp = Server.CreateObject("ADODB.Recordset")
		rst_tmp.Open SQL, objConn, adOpenStatic, adLockReadOnly   

    If Not rst_tmp.EOF Then
	     Do While Not rst_tmp.EOF
          
           	lst_wert = rst_tmp.Fields("lng_k_measurement")
		    lst_string = rst_tmp.Fields("str_readout")
%>
    <option <%If lst_wert = Cint(lng_fk_inch_mother) Then %>selected<%end if%> value="<%=lst_wert%>"><%=lst_string%></option>
  <%
             rst_tmp.MoveNext
			 
        Loop
  	End if

		rst_tmp.Close
set rst_tmp = Nothing
'------------------------------------------------------------------------------------------------------
%>
  </select>
  </div></td>
  <td>
  <div align="left">
  <select name="LST_sixteenth_mother" size="1" class="fieldmeasure" <%If i_measured > 0 Then %>disabled="disabled"<% end if%> id="LST_sixteenth_mother" style="">
  <%
'DropDown <>----------------------------------------------------------------------------------
SQL = "SELECT lng_k_measurement, str_readout FROM tbl_0512_measured_units WHERE i_fk_measurement_group = 6 Order by dbl_value_x"

	Set rst_tmp = Server.CreateObject("ADODB.Recordset")
		rst_tmp.Open SQL, objConn, adOpenStatic, adLockReadOnly   

    If Not rst_tmp.EOF Then
	     Do While Not rst_tmp.EOF
          
           	lst_wert = rst_tmp.Fields("lng_k_measurement")
		    lst_string = rst_tmp.Fields("str_readout")
%>
    <option <%If lst_wert = Cint(lng_fk_sixteenth_inch_mother) Then %>selected<%end if%> value="<%=lst_wert%>"><%=lst_string%></option>
  <%
             rst_tmp.MoveNext
			 
        Loop
  	End if

		rst_tmp.Close
set rst_tmp = Nothing
'------------------------------------------------------------------------------------------------------
%>
  </select>
  </div></td>
  </tr>
  <tr id="tab_feet_32_mother" style="display:none">
  <td width="489" class="txtform"><%= fc_value_string(Session("ses_i_language"), "var_u_adm_d_71") %><span class="Stil4">*</span></td>
  <td width="270">
  <div align="left">
  <select name="LST_feet_32_mother" size="1" class="fieldmeasure" <%If i_measured > 0 Then %>disabled="disabled"<% end if%> id="LST_feet_32_mother" >
  <%
'DropDown <>----------------------------------------------------------------------------------
SQL = "SELECT lng_k_measurement, str_readout FROM tbl_0512_measured_units WHERE i_fk_measurement_group = 1 Order by dbl_value_x"

	Set rst_tmp = Server.CreateObject("ADODB.Recordset")
		rst_tmp.Open SQL, objConn, adOpenStatic, adLockReadOnly   

    If Not rst_tmp.EOF Then
	     Do While Not rst_tmp.EOF
          
           	lst_wert = rst_tmp.Fields("lng_k_measurement")
		    lst_string = rst_tmp.Fields("str_readout")

%>
    <option <%If lst_wert = Cint(lng_fk_feet_mother) Then %>selected<%end if%> value="<%=lst_wert%>"><%=lst_string%></option>
  <%
             rst_tmp.MoveNext
			 
        Loop
  	End if

		rst_tmp.Close
set rst_tmp = Nothing
'------------------------------------------------------------------------------------------------------
%>
  </select>
  </div></td>
  <td width="90">
  <div align="left">
  <select name="LST_inch_32_mother" size="1" class="fieldmeasure" <%If i_measured > 0 Then %>disabled="disabled"<% end if%> id="LST_inch_32_mother" style="">
  <%
'DropDown <>----------------------------------------------------------------------------------
SQL = "SELECT lng_k_measurement, str_readout FROM tbl_0512_measured_units WHERE i_fk_measurement_group = 2 Order by dbl_value_x"

	Set rst_tmp = Server.CreateObject("ADODB.Recordset")
		rst_tmp.Open SQL, objConn, adOpenStatic, adLockReadOnly   

    If Not rst_tmp.EOF Then
	     Do While Not rst_tmp.EOF
          
           	lst_wert = rst_tmp.Fields("lng_k_measurement")
		    lst_string = rst_tmp.Fields("str_readout")
%>
    <option <%If lst_wert = Cint(lng_fk_inch_mother) Then %>selected<%end if%> value="<%=lst_wert%>"><%=lst_string%></option>
  <%
             rst_tmp.MoveNext
			 
        Loop
  	End if

		rst_tmp.Close
set rst_tmp = Nothing
'------------------------------------------------------------------------------------------------------
%>
  </select>
  </div></td>
  <td>
  <div align="left">
  <select name="LST_thirtysecond_inch_mother" size="1" class="fieldmeasure" <%If i_measured > 0 Then %>disabled="disabled"<% end if%> id="LST_thirtysecond_inch_mother" style="">
  <%
'DropDown <>----------------------------------------------------------------------------------
SQL = "SELECT lng_k_measurement, str_readout FROM tbl_0512_measured_units WHERE i_fk_measurement_group = 7 Order by dbl_value_x"

	Set rst_tmp = Server.CreateObject("ADODB.Recordset")
		rst_tmp.Open SQL, objConn, adOpenStatic, adLockReadOnly   

    If Not rst_tmp.EOF Then
	     Do While Not rst_tmp.EOF
          
           	lst_wert = rst_tmp.Fields("lng_k_measurement")
		    lst_string = rst_tmp.Fields("str_readout")
%>
    <option <%If lst_wert = Cint(lng_fk_thirtysecond_inch_mother) Then %>selected<%end if%> value="<%=lst_wert%>"><%=lst_string%></option>
  <%
             rst_tmp.MoveNext
			 
        Loop
  	End if

		rst_tmp.Close
set rst_tmp = Nothing
'------------------------------------------------------------------------------------------------------
%>
  </select>
  </div></td>
  </tr>
  <tr>
  <td width="489" class="txtform">&nbsp;</td>
  <td width="270" colspan="3">&nbsp;</td>
  </tr>
  <tr>
  <td width="489" height="50" colspan="4" valign="bottom" class="txttable">
  <table width="470" border="0" cellspacing="0" cellpadding="0">
  <tr>
  <td width="420" height="50" valign="bottom"><strong><img src="images/ico/man_info32.png" width="32" height="32" hspace="5" /><br />
    <%= fc_value_string(Session("ses_i_language"), "var_u_adm_d_61") %></strong><img src="images/ico/help16.png" alt="" width="16" height="16" hspace="10" class="help" onMouseOver="Tip('<%= hint_125 %>', TITLE, '<div class=\'TitleCls\'><%= hint_title_125 %></div>')" onMouseOut="UnTip()" /></td>
  <td width="50" height="50" align="right" valign="bottom">&nbsp;</td>
  </tr>
  </table></td>
  </tr>
  <tr>
  <td width="489">&nbsp;</td>
  <td width="270" colspan="3">&nbsp;</td>
  </tr>
  <tr>
  <td width="489" class="txtform"><%= fc_value_string(Session("ses_i_language"), "var_u_adm_d_73") %><span class="Stil4"> *</span></td>
  <td width="270" colspan="3"><div align="left">
  <select name="LST_i_measured_sytem_father" size="1" class="fieldhalf" id="LST_i_measured_sytem_father" <%If i_measured > 0 Then %>disabled="disabled"<% end if%> onchange="javascript: refresh_measured_sytem_father()">
  <%
'DropDown <>----------------------------------------------------------------------------------
If Session("ses_i_language")= 1 Then'0=keine auswahl 1=german 2=english
	SQL = "SELECT i_k_measured_system, str_measured_system_de FROM tbl_0511_measured_sytem Order by i_sort"
end if
If Session("ses_i_language")= 2 Then'0=keine auswahl 1=german 2=english
	SQL = "SELECT i_k_measured_system, str_measured_system FROM tbl_0511_measured_sytem Order by i_sort"
end if

'Con_Msg_06 = "-bitte wählen sie-" 
If Cint(i_fk_measured_system_father) = 0 or IsEmpty(i_fk_measured_system_father) or IsNull(i_fk_measured_system_father) Then
	lst_wert = 0
	lst_string = Const_str_01'Con_Msg_06
	i_fk_measured_system_father = 0
%>
  <option <%If lst_wert = Cint(i_fk_measured_system_mother) Then %>selected<%end if%> value="<%=lst_wert%>"><%=lst_string%></option>
  <%
end if

	Set rst_tmp = Server.CreateObject("ADODB.Recordset")
		rst_tmp.Open SQL, objConn, adOpenStatic, adLockReadOnly   

    If Not rst_tmp.EOF Then
	     Do While Not rst_tmp.EOF
          
           	lst_wert = rst_tmp.Fields("i_k_measured_system")
			If Session("ses_i_language")= 1 Then'german
		    	lst_string = rst_tmp.Fields("str_measured_system_de")
			end if
			If Session("ses_i_language")= 2 Then'english
		    	lst_string = rst_tmp.Fields("str_measured_system")
			end if

%>
    <option <%If lst_wert = Cint(i_fk_measured_system_father) Then %>selected<%end if%> value="<%=lst_wert%>"><%=lst_string%></option>
  <%
      rst_tmp.MoveNext
			 
        Loop
  	End if

		rst_tmp.Close
set rst_tmp = Nothing
'------------------------------------------------------------------------------------------------------
%>
  </select> 
  </div></td>
  </tr>
  <tr>
  <td class="txtform"><%= fc_value_string(Session("ses_i_language"), "var_invite_global_09") %></td>
  <td colspan="3">&nbsp;</td>
  </tr>
  <tr>
  <td class="txtform"><%= fc_value_string(Session("ses_i_language"), "var_u_adm_d_74") %><span class="Stil4"> *</span></td>
  <td><input type="checkbox" alt="Auswählen, falls die Information im Moment nicht zur Verfügung steht." title="Auswählen, falls die Information im Moment nicht zur Verfügung steht." name="ckk_i_father_default" value="checkbox"<%If i_father_default = 1 Then%>CHECKED<%end if%> onclick="javascript: refresh_measured_sytem_father()"/> <img src="images/ico/help16.png" alt="" width="16" height="16" hspace="10" class="help" onMouseOver="Tip('<%= hint_150 %>', TITLE, '<div class=\'TitleCls\'><%= hint_title_150 %></div>')" onMouseOut="UnTip()" /></td>
  <td>&nbsp;</td>
  <td>&nbsp;</td>
  </tr>
  <tr id="tab_cm_father" style="display:none">
  <td width="489" class="txtform"><%= fc_value_string(Session("ses_i_language"), "var_u_adm_d_71") %><span class="Stil4">*</span></td>
  <td width="270">
  <div align="left">
  <select name="LST_cm_father" size="1" class="fieldmeasure" <%If i_measured > 0 Then %>disabled="disabled"<% end if%> id="LST_cm_father" style="">
    <%
'DropDown <>----------------------------------------------------------------------------------
SQL = "SELECT lng_k_measurement, str_readout FROM tbl_0512_measured_units WHERE i_fk_measurement_group = 8 Order by dbl_value_x"

	Set rst_tmp = Server.CreateObject("ADODB.Recordset")
		rst_tmp.Open SQL, objConn, adOpenStatic, adLockReadOnly   

    If Not rst_tmp.EOF Then
	     Do While Not rst_tmp.EOF
          
           	lst_wert = rst_tmp.Fields("lng_k_measurement")
		    lst_string = rst_tmp.Fields("str_readout")
%>
    <option <%If lst_wert = Cint(lng_fk_cm_father) Then %>selected<%end if%> value="<%=lst_wert%>"><%=lst_string%></option>
    <%
             rst_tmp.MoveNext
			 
        Loop
  	End if

		rst_tmp.Close
set rst_tmp = Nothing
'------------------------------------------------------------------------------------------------------
%>
  </select>
  </div></td>
  <td width="90">
  <div align="left">
  <select name="LST_cm_deci_father" size="1" class="fieldmeasure" <%If i_measured > 0 Then %>disabled="disabled"<% end if%> id="LST_cm_deci_father" style="">
  <%
'DropDown <>----------------------------------------------------------------------------------
SQL = "SELECT lng_k_measurement, str_readout FROM tbl_0512_measured_units WHERE i_fk_measurement_group = 9 Order by dbl_value_x"

	Set rst_tmp = Server.CreateObject("ADODB.Recordset")
		rst_tmp.Open SQL, objConn, adOpenStatic, adLockReadOnly   

    If Not rst_tmp.EOF Then
	     Do While Not rst_tmp.EOF
          
           	lst_wert = rst_tmp.Fields("lng_k_measurement")
		    lst_string = rst_tmp.Fields("str_readout")
%>
    <option <%If lst_wert = Cint(lng_fk_cm_deci_father) Then %>selected<%end if%> value="<%=lst_wert%>"><%=lst_string%></option>
    <%
             rst_tmp.MoveNext
			 
        Loop
  	End if

		rst_tmp.Close
set rst_tmp = Nothing
'------------------------------------------------------------------------------------------------------
%>
  </select>
  </div></td>
  <td width="90">&nbsp;</td>
  </tr>
  <tr id="tab_feet_08_father" style="display:none">
  <td width="489" class="txtform"><%= fc_value_string(Session("ses_i_language"), "var_u_adm_d_71") %><span class="Stil4">*</span></td>
  <td width="270">
  <div align="left">
  <select name="LST_feet_08_father" size="1" class="fieldmeasure" <%If i_measured > 0 Then %>disabled="disabled"<% end if%> id="LST_feet_08_father" >
  <%
'DropDown <>----------------------------------------------------------------------------------
SQL = "SELECT lng_k_measurement, str_readout FROM tbl_0512_measured_units WHERE i_fk_measurement_group = 1 Order by dbl_value_x"

	Set rst_tmp = Server.CreateObject("ADODB.Recordset")
		rst_tmp.Open SQL, objConn, adOpenStatic, adLockReadOnly   

    If Not rst_tmp.EOF Then
	     Do While Not rst_tmp.EOF
          
           	lst_wert = rst_tmp.Fields("lng_k_measurement")
		    lst_string = rst_tmp.Fields("str_readout")

%>
    <option <%If lst_wert = Cint(lng_fk_feet_father) Then %>selected<%end if%> value="<%=lst_wert%>"><%=lst_string%></option>
  <%
             rst_tmp.MoveNext
			 
        Loop
  	End if

		rst_tmp.Close
set rst_tmp = Nothing
'------------------------------------------------------------------------------------------------------
%>
  </select>
  </div></td>
  <td width="90">
  <div align="left">
  <select name="LST_inch_08_father" size="1" class="fieldmeasure" <%If i_measured > 0 Then %>disabled="disabled"<% end if%> id="LST_inch_08_father" style="">
  <%
'DropDown <>----------------------------------------------------------------------------------
SQL = "SELECT lng_k_measurement, str_readout FROM tbl_0512_measured_units WHERE i_fk_measurement_group = 2 Order by dbl_value_x"

	Set rst_tmp = Server.CreateObject("ADODB.Recordset")
		rst_tmp.Open SQL, objConn, adOpenStatic, adLockReadOnly   

    If Not rst_tmp.EOF Then
	     Do While Not rst_tmp.EOF
          
           	lst_wert = rst_tmp.Fields("lng_k_measurement")
		    lst_string = rst_tmp.Fields("str_readout")
%>
    <option <%If lst_wert = Cint(lng_fk_inch_father) Then %>selected<%end if%> value="<%=lst_wert%>"><%=lst_string%></option>
  <%
             rst_tmp.MoveNext
			 
        Loop
  	End if

		rst_tmp.Close
set rst_tmp = Nothing
'------------------------------------------------------------------------------------------------------
%>
  </select>
  </div></td>
  <td width="90">
  <div align="left">
  <select name="LST_eighths_inch_father" size="1" class="fieldmeasure" <%If i_measured > 0 Then %>disabled="disabled"<% end if%> id="LST_eighths_inch_father" style="">
  <%
'DropDown <>----------------------------------------------------------------------------------
SQL = "SELECT lng_k_measurement, str_readout FROM tbl_0512_measured_units WHERE i_fk_measurement_group = 5 Order by dbl_value_x"

	Set rst_tmp = Server.CreateObject("ADODB.Recordset")
		rst_tmp.Open SQL, objConn, adOpenStatic, adLockReadOnly   

    If Not rst_tmp.EOF Then
	     Do While Not rst_tmp.EOF
          
           	lst_wert = rst_tmp.Fields("lng_k_measurement")
		    lst_string = rst_tmp.Fields("str_readout")
%>
    <option <%If lst_wert = Cint(lng_fk_eighths_inch_father) Then %>selected<%end if%> value="<%=lst_wert%>"><%=lst_string%></option>
  <%
             rst_tmp.MoveNext
			 
        Loop
  	End if

		rst_tmp.Close
set rst_tmp = Nothing
'------------------------------------------------------------------------------------------------------
%>
  </select>
  </div></td>
  </tr>
  <tr id="tab_feet_16_father" style="display:none">
  <td width="489" class="txtform"><%= fc_value_string(Session("ses_i_language"), "var_u_adm_d_71") %><span class="Stil4">*</span></td>
  <td width="270">
  <div align="left">
  <select name="LST_feet_16_father" size="1" class="fieldmeasure" <%If i_measured > 0 Then %>disabled="disabled"<% end if%> id="LST_feet_16_father" >
  <%
'DropDown <>----------------------------------------------------------------------------------
SQL = "SELECT lng_k_measurement, str_readout FROM tbl_0512_measured_units WHERE i_fk_measurement_group = 1 Order by dbl_value_x"

	Set rst_tmp = Server.CreateObject("ADODB.Recordset")
		rst_tmp.Open SQL, objConn, adOpenStatic, adLockReadOnly   

    If Not rst_tmp.EOF Then
	     Do While Not rst_tmp.EOF
          
           	lst_wert = rst_tmp.Fields("lng_k_measurement")
		    lst_string = rst_tmp.Fields("str_readout")

%>
    <option <%If lst_wert = Cint(lng_fk_feet_father) Then %>selected<%end if%> value="<%=lst_wert%>"><%=lst_string%></option>
  <%
             rst_tmp.MoveNext
			 
        Loop
  	End if

		rst_tmp.Close
set rst_tmp = Nothing
'------------------------------------------------------------------------------------------------------
%>
  </select>
  </div></td>
  <td width="90">
  <div align="left">
  <select name="LST_inch_16_father" size="1" class="fieldmeasure" <%If i_measured > 0 Then %>disabled="disabled"<% end if%> id="LST_inch_16_father" style="">
  <%
'DropDown <>----------------------------------------------------------------------------------
SQL = "SELECT lng_k_measurement, str_readout FROM tbl_0512_measured_units WHERE i_fk_measurement_group = 2 Order by dbl_value_x"

	Set rst_tmp = Server.CreateObject("ADODB.Recordset")
		rst_tmp.Open SQL, objConn, adOpenStatic, adLockReadOnly   

    If Not rst_tmp.EOF Then
	     Do While Not rst_tmp.EOF
          
           	lst_wert = rst_tmp.Fields("lng_k_measurement")
		    lst_string = rst_tmp.Fields("str_readout")
%>
    <option <%If lst_wert = Cint(lng_fk_inch_father) Then %>selected<%end if%> value="<%=lst_wert%>"><%=lst_string%></option>
  <%
             rst_tmp.MoveNext
			 
        Loop
  	End if

		rst_tmp.Close
set rst_tmp = Nothing
'------------------------------------------------------------------------------------------------------
%>
  </select>
  </div></td>
  <td width="90">
  <div align="left">
  <select name="LST_sixteenth_father" size="1" class="fieldmeasure" <%If i_measured > 0 Then %>disabled="disabled"<% end if%> id="LST_sixteenth_father" style="">
  <%
'DropDown <>----------------------------------------------------------------------------------
SQL = "SELECT lng_k_measurement, str_readout FROM tbl_0512_measured_units WHERE i_fk_measurement_group = 6 Order by dbl_value_x"

	Set rst_tmp = Server.CreateObject("ADODB.Recordset")
		rst_tmp.Open SQL, objConn, adOpenStatic, adLockReadOnly   

    If Not rst_tmp.EOF Then
	     Do While Not rst_tmp.EOF
          
           	lst_wert = rst_tmp.Fields("lng_k_measurement")
		    lst_string = rst_tmp.Fields("str_readout")
%>
    <option <%If lst_wert = Cint(lng_fk_sixteenth_inch_father) Then %>selected<%end if%> value="<%=lst_wert%>"><%=lst_string%></option>
    <%
             rst_tmp.MoveNext
			 
        Loop
  	End if

		rst_tmp.Close
set rst_tmp = Nothing
'------------------------------------------------------------------------------------------------------
%>
  </select>
  </div></td>
  </tr>
  <tr id="tab_feet_32_father" style="display:none">
  <td width="489" class="txtform"><%= fc_value_string(Session("ses_i_language"), "var_u_adm_d_71") %><span class="Stil4">*</span></td>
  <td width="270">
  <div align="left">
  <select name="LST_feet_32_father" size="1" class="fieldmeasure" <%If i_measured > 0 Then %>disabled="disabled"<% end if%> id="LST_feet_32_father" >
  <%
'DropDown <>----------------------------------------------------------------------------------
SQL = "SELECT lng_k_measurement, str_readout FROM tbl_0512_measured_units WHERE i_fk_measurement_group = 1 Order by dbl_value_x"

	Set rst_tmp = Server.CreateObject("ADODB.Recordset")
		rst_tmp.Open SQL, objConn, adOpenStatic, adLockReadOnly   

    If Not rst_tmp.EOF Then
	     Do While Not rst_tmp.EOF
          
           	lst_wert = rst_tmp.Fields("lng_k_measurement")
		    lst_string = rst_tmp.Fields("str_readout")

%>
    <option <%If lst_wert = Cint(lng_fk_feet_father) Then %>selected<%end if%> value="<%=lst_wert%>"><%=lst_string%></option>
  <%
             rst_tmp.MoveNext
			 
        Loop
  	End if

		rst_tmp.Close
set rst_tmp = Nothing
'------------------------------------------------------------------------------------------------------
%>
  </select>
  </div></td>
  <td width="90">
  <div align="left">
  <select name="LST_inch_32_father" size="1" class="fieldmeasure" <%If i_measured > 0 Then %>disabled="disabled"<% end if%> id="LST_inch_32_father" style="">
  <%
'DropDown <>----------------------------------------------------------------------------------
SQL = "SELECT lng_k_measurement, str_readout FROM tbl_0512_measured_units WHERE i_fk_measurement_group = 2 Order by dbl_value_x"

	Set rst_tmp = Server.CreateObject("ADODB.Recordset")
		rst_tmp.Open SQL, objConn, adOpenStatic, adLockReadOnly   

    If Not rst_tmp.EOF Then
	     Do While Not rst_tmp.EOF
          
           	lst_wert = rst_tmp.Fields("lng_k_measurement")
		    lst_string = rst_tmp.Fields("str_readout")
%>
    <option <%If lst_wert = Cint(lng_fk_inch_father) Then %>selected<%end if%> value="<%=lst_wert%>"><%=lst_string%></option>
  <%
             rst_tmp.MoveNext
			 
        Loop
  	End if

		rst_tmp.Close
set rst_tmp = Nothing
'------------------------------------------------------------------------------------------------------
%>
  </select>
  </div></td>
  <td width="90">
  <div align="left">
  <select name="LST_thirtysecond_inch_father" size="1" class="fieldmeasure" <%If i_measured > 0 Then %>disabled="disabled"<% end if%> id="LST_thirtysecond_inch_father" style="">
  <%
'DropDown <>----------------------------------------------------------------------------------
SQL = "SELECT lng_k_measurement, str_readout FROM tbl_0512_measured_units WHERE i_fk_measurement_group = 7 Order by dbl_value_x"

	Set rst_tmp = Server.CreateObject("ADODB.Recordset")
		rst_tmp.Open SQL, objConn, adOpenStatic, adLockReadOnly   

    If Not rst_tmp.EOF Then
	     Do While Not rst_tmp.EOF
          
           	lst_wert = rst_tmp.Fields("lng_k_measurement")
		    lst_string = rst_tmp.Fields("str_readout")
%>
    <option <%If lst_wert = Cint(lng_fk_thirtysecond_inch_father) Then %>selected<%end if%> value="<%=lst_wert%>"><%=lst_string%></option>
    <%
             rst_tmp.MoveNext
			 
        Loop
  	End if

		rst_tmp.Close
set rst_tmp = Nothing
'------------------------------------------------------------------------------------------------------
%>
  </select>
  </div></td>
  </tr>
    
  <tr>
  <td width="489" class="txtform">&nbsp;</td>
  <td width="270">&nbsp;</td>
  <td width="90">&nbsp;</td>
  <td width="90">&nbsp;</td>
  </tr>            
    
  <tr>
  <td width="489" valign="bottom" class="txttable">&nbsp;</td>
  <td width="270" colspan="3" valign="bottom" class="txttable">&nbsp;</td>
  </tr>
  <tr>
  <td width="489" height="30" colspan="4" class="txtform"><p><img src="images/ico/warning24.png" width="24" height="24" vspace="5" /><br />
  </p>
  <p class="txtblock11"><%= fc_value_string(Session("ses_i_language"), "var_u_adm_d_77") %>.<br />
  <br />
  </p></td>
  </tr>
  <tr>
  <td width="489" class="txttable">&nbsp;</td>
  <td width="270" colspan="3" class="txttable">&nbsp;</td>
  </tr>
  <tr>
  <td width="489" height="40" valign="bottom" class="txtform">&nbsp;</td>
  <td width="270" height="40" colspan="3" valign="bottom" class="Stil6">
  <%
'btnSub_01 >> Save
'btnSub_03 >> Record Save
'Save Profile
'Submit and Send
If trancd <> "N" Then %>
  <input name="btnSub_01" type="submit" class="<%= str_save_button_size %>" value="<%= fc_value_string(Session("ses_i_language"), "var_u_adm_d_45") %>" />
  <% 
end if
If trancd = "N" Then
%>
  <input name="btnSub_03" type="submit" class="<%= str_save_button_size %>" value="<%= fc_value_string(Session("ses_i_language"), "var_u_adm_d_46") %>" />
  <% end if %></td>
  </tr>
  <tr>
  <td width="489" height="40" valign="bottom" class="txtform">&nbsp;</td>
  <td width="270" height="40" colspan="3" valign="bottom" class="Stil6">&nbsp;</td>
  </tr>
  <tr>
  <td height="30" width="489" colspan="4" class="txtform"><table width="450" border="0" cellpadding="0" cellspacing="0">
  <tr>
  <td width="50" align="center" valign="middle"><div align="center"><font color="#02026A" size="2" face="Geneva, Arial, Helvetica, sans-serif">
  <input name="ckk_i_emails_no" type="checkbox" value="checkbox" <%If Cint(i_emails_no) = 1 Then%>CHECKED<%end if%> />
  </font></div></td>
  <td width="400" valign="top"><p class="txtblock11"><%= fc_value_string(Session("ses_i_language"), "var_u_adm_d_40") %></p></td>
  </tr>
  </table></td>
  </tr>
  </table></td>
  <td width="29" align="center" valign="bottom">&nbsp;</td>
  <td width="29" align="center" valign="bottom">&nbsp;</td>
  <td width="29" align="center" valign="bottom">&nbsp;</td>
</tr>
<tr>
<td width="50" align="center" valign="bottom">&nbsp;</td>
<td width="489" valign="top">&nbsp;</td>
<td width="29" align="center" valign="bottom">&nbsp;</td>
<td width="29" align="center" valign="bottom">&nbsp;</td>
<td width="29" align="center" valign="bottom">&nbsp;</td>
</tr>
<tr>
<td width="50" align="center" valign="bottom">&nbsp;</td>
<td height="50" width="489" valign="bottom" class="txttable"><strong ><img src="images/ico/access_info32.png" alt="" width="32" height="32" vspace="2" border="0" /><br />
  <%= fc_value_string(Session("ses_i_language"), "var_u_adm_d_44") %></strong></td>
<td width="29" align="center" valign="bottom">&nbsp;</td>
<td width="29" align="center" valign="bottom">&nbsp;</td>
<td width="29" align="center" valign="bottom">&nbsp;</td>
</tr>
<tr>
<td width="50" align="center" valign="bottom">&nbsp;</td>
<td width="489" valign="top"><table width="450" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="190" class="txtsm"><%= fc_value_string(Session("ses_i_language"), "var_u_adm_d_41") %></td>
<td width="260" class="txtsm"><%= str_createinfo %></td>
</tr>
<tr>
<td width="190" class="txtsm"><%= fc_value_string(Session("ses_i_language"), "var_u_adm_d_42") %></td>
<td width="260" class="txtsm"><%= str_updateinfo %></td>
</tr>
</table></td>
<td width="29" align="center" valign="bottom">&nbsp;</td>
<td width="29" align="center" valign="bottom">&nbsp;</td>
<td width="29" align="center" valign="bottom">&nbsp;</td>
</tr>
<tr>
<td width="50" align="center" valign="bottom">&nbsp;</td>
<td width="489" height="30" valign="top">&nbsp;</td>
<td width="29" align="center" valign="bottom">&nbsp;</td>
<td width="29" align="center" valign="bottom">&nbsp;</td>
<td width="29" align="center" valign="bottom">&nbsp;</td>
</tr>
<tr>
<td colspan="5"></td>
</tr>
</table>
</form>              
</td>
</tr>
</table>

<table width="675" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>&nbsp;</td>
<td width="650" valign="top">

</td>
</tr>
</table>
</td>
<td width="25"><p>&nbsp;</p>
</td>
</tr>
</table></td>
        <!-- InstanceEndEditable -->
<td width="25" valign="top">&nbsp;</td>
</tr>
</table></td>
</tr>
<tr>
<td width="950" height="71" valign="bottom" background="<%= fc_value_string(Session("ses_i_language"), "var_glob_bitm_21") %>" class="txtlegal"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="230">&nbsp;</td>
<td height="24" align="left" valign="top" class="txtsm11">
<table width="100%" border="0">
<tr>
<td width="84%" height="35" valign="top"><span class="txtlegal"><a href="contact_us.asp"><%= fc_value_string(Session("ses_i_language"), "var_glob_txt_07") %></a> | <a href="about.asp"><%= fc_value_string(Session("ses_i_language"), "var_glob_txt_08") %></a> | <a href="terms.asp"><%= fc_value_string(Session("ses_i_language"), "var_glob_txt_09") %></a> | <a href="terms.asp#disclaimer"><%= fc_value_string(Session("ses_i_language"), "var_glob_txt_10") %></a> | <a href="terms.asp#privacy"><%= fc_value_string(Session("ses_i_language"), "var_glob_txt_11") %></a> | </span>
<% If Session("ses_i_language") = 2 Then %>
<input name="btnSublanguage" type="image" onClick="javascript: change_language(1)" value="lang01" src="../App/images/country/flag_germany.png" align="middle" width="16" height="16" vspace="1" border="0"/>
<% end if %>
<% If Session("ses_i_language") = 1 Then %>
<input name="btnSublanguage" type="image" onclick="javascript: change_language(2)" value="lang02" src="../App/images/country/flag_usa.png" align="middle" width="16" height="16" vspace="1" border="0"/>
<% end if %>     
</td>
<td width="5%" height="35" valign="top">&nbsp;</td>
<td width="5%" height="35" valign="top">&nbsp;</td>
<td width="6%" height="35" valign="top">&nbsp;</td>
</tr>
</table>
</td>
</tr>
</table></td>
</tr>
</table>
</td>
</tr>
</table>
<!--#include file="change_pw.html"-->
<%
If Err.Number <> 0 Then
	Response.Write(Err.Description)
	Err.Clear
End If
%>
<script>
    lng_k_email_inquiry = '<%=Session("ses_lpw_lng_k_email_inquiry")%>';
    str_User_id = '<%=Session("ses_lpw_str_User_id")%>';
</script>
</body>
<!-- InstanceEnd -->
<%
If bol_objConn = True Then           
        objConn.Close 
	set objConn = Nothing 
	bol_objConn = False
end if
%>
</html>
